Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-27 Thread Jason Wang
On 2018/12/26 下午9:46, Michael S. Tsirkin wrote: On Wed, Dec 26, 2018 at 01:43:26PM +0800, Jason Wang wrote: On 2018/12/26 上午12:25, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 05:43:25PM +0800, Jason Wang wrote: On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 11:

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-26 Thread Michael S. Tsirkin
On Wed, Dec 26, 2018 at 01:43:26PM +0800, Jason Wang wrote: > > On 2018/12/26 上午12:25, Michael S. Tsirkin wrote: > > On Tue, Dec 25, 2018 at 05:43:25PM +0800, Jason Wang wrote: > > > On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: > > > > On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote:

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Jason Wang
On 2018/12/26 上午12:25, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 05:43:25PM +0800, Jason Wang wrote: On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 10:

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Michael S. Tsirkin
On Tue, Dec 25, 2018 at 05:43:25PM +0800, Jason Wang wrote: > > On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: > > On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: > > > On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote:

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Jason Wang
On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote: On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: Just to make sure I underst

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-24 Thread Michael S. Tsirkin
On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: > > On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: > > On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote: > > > On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: > > > > > Just to make sure I understand this. It looks to me we sh

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-23 Thread Jason Wang
On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote: On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: Just to make sure I understand this. It looks to me we should: - allow passing GIOVA->GPA through UAPI - cache GIOVA->GPA somewhere but

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-18 Thread Michael S. Tsirkin
On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote: > > On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: > > > Just to make sure I understand this. It looks to me we should: > > > > > > - allow passing GIOVA->GPA through UAPI > > > > > > - cache GIOVA->GPA somewhere but still use GIOVA->

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-17 Thread Jason Wang
On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: Just to make sure I understand this. It looks to me we should: - allow passing GIOVA->GPA through UAPI - cache GIOVA->GPA somewhere but still use GIOVA->HVA in device IOTLB for performance Is this what you suggest? Thanks Not really. We alrea

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-16 Thread Michael S. Tsirkin
On Thu, Dec 13, 2018 at 10:39:41AM +0800, Jason Wang wrote: > > On 2018/12/12 下午10:32, Michael S. Tsirkin wrote: > > On Wed, Dec 12, 2018 at 06:08:19PM +0800, Jason Wang wrote: > > > Vhost dirty page logging API is designed to sync through GPA. But we > > > try to log GIOVA when device IOTLB is en

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-15 Thread Jason Wang
On 2018/12/12 下午10:32, Michael S. Tsirkin wrote: On Wed, Dec 12, 2018 at 06:08:19PM +0800, Jason Wang wrote: Vhost dirty page logging API is designed to sync through GPA. But we try to log GIOVA when device IOTLB is enabled. This is wrong and may lead to missing data after migration. To solve

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-14 Thread Michael S. Tsirkin
On Wed, Dec 12, 2018 at 06:08:19PM +0800, Jason Wang wrote: > Vhost dirty page logging API is designed to sync through GPA. But we > try to log GIOVA when device IOTLB is enabled. This is wrong and may > lead to missing data after migration. > > To solve this issue, when logging with device IOTLB

[PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-13 Thread Jason Wang
Vhost dirty page logging API is designed to sync through GPA. But we try to log GIOVA when device IOTLB is enabled. This is wrong and may lead to missing data after migration. To solve this issue, when logging with device IOTLB enabled, we will: 1) reuse the device IOTLB translation result of GIO