Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-25 Thread Andrey Gruzdev
On 25.11.2020 21:41, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: On 25.11.2020 16:08, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: In this particular implementation the same single migration thread is responsible

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-25 Thread Dr. David Alan Gilbert
* Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > On 25.11.2020 16:08, Dr. David Alan Gilbert wrote: > > * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > > > In this particular implementation the same single migration > > > thread is responsible for both normal linear dirty page > >

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-25 Thread Andrey Gruzdev
On 25.11.2020 16:08, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: In this particular implementation the same single migration thread is responsible for both normal linear dirty page migration and procesing UFFD page fault events. Processing write faults

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-25 Thread Dr. David Alan Gilbert
* Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > In this particular implementation the same single migration > thread is responsible for both normal linear dirty page > migration and procesing UFFD page fault events. > > Processing write faults includes reading UFFD file descriptor, >

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-24 Thread Andrey Gruzdev
On 24.11.2020 18:17, Peter Xu wrote: On Tue, Nov 24, 2020 at 11:02:09AM +0300, Andrey Gruzdev wrote: On 24.11.2020 00:34, Peter Xu wrote: On Fri, Nov 20, 2020 at 07:53:34PM +0300, Andrey Gruzdev wrote: On 20.11.2020 19:43, Peter Xu wrote: On Fri, Nov 20, 2020 at 07:15:07PM +0300, Andrey

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-24 Thread Peter Xu
On Tue, Nov 24, 2020 at 11:02:09AM +0300, Andrey Gruzdev wrote: > On 24.11.2020 00:34, Peter Xu wrote: > > On Fri, Nov 20, 2020 at 07:53:34PM +0300, Andrey Gruzdev wrote: > > > On 20.11.2020 19:43, Peter Xu wrote: > > > > On Fri, Nov 20, 2020 at 07:15:07PM +0300, Andrey Gruzdev wrote: > > > > >

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-24 Thread Andrey Gruzdev
On 24.11.2020 00:34, Peter Xu wrote: On Fri, Nov 20, 2020 at 07:53:34PM +0300, Andrey Gruzdev wrote: On 20.11.2020 19:43, Peter Xu wrote: On Fri, Nov 20, 2020 at 07:15:07PM +0300, Andrey Gruzdev wrote: Yeah, I think we can re-use the postcopy queue code for faulting pages. I'm worring a

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-23 Thread Peter Xu
On Fri, Nov 20, 2020 at 07:53:34PM +0300, Andrey Gruzdev wrote: > On 20.11.2020 19:43, Peter Xu wrote: > > On Fri, Nov 20, 2020 at 07:15:07PM +0300, Andrey Gruzdev wrote: > > > Yeah, I think we can re-use the postcopy queue code for faulting pages. > > > I'm > > > worring a little about some

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-20 Thread Andrey Gruzdev
On 20.11.2020 19:43, Peter Xu wrote: On Fri, Nov 20, 2020 at 07:15:07PM +0300, Andrey Gruzdev wrote: Yeah, I think we can re-use the postcopy queue code for faulting pages. I'm worring a little about some additional overhead dealing with urgent request semaphore. Also, the code won't change a

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-20 Thread Peter Xu
On Fri, Nov 20, 2020 at 07:15:07PM +0300, Andrey Gruzdev wrote: > Yeah, I think we can re-use the postcopy queue code for faulting pages. I'm > worring a little about some additional overhead dealing with urgent request > semaphore. Also, the code won't change a lot, something like: > > [...] >

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-20 Thread Andrey Gruzdev
On 20.11.2020 18:07, Peter Xu wrote: On Fri, Nov 20, 2020 at 01:44:53PM +0300, Andrey Gruzdev wrote: On 19.11.2020 21:25, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:36PM +0300, Andrey Gruzdev via wrote: [...] +/** + * ram_find_block_by_host_address: find RAM block containing host page +

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-20 Thread Peter Xu
On Fri, Nov 20, 2020 at 01:44:53PM +0300, Andrey Gruzdev wrote: > On 19.11.2020 21:25, Peter Xu wrote: > > On Thu, Nov 19, 2020 at 03:59:36PM +0300, Andrey Gruzdev via wrote: > > > > [...] > > > > > +/** > > > + * ram_find_block_by_host_address: find RAM block containing host page > > > + * > >

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 21:25, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:36PM +0300, Andrey Gruzdev via wrote: [...] +/** + * ram_find_block_by_host_address: find RAM block containing host page + * + * Returns true if RAM block is found and pss->block/page are + * pointing to the given host page,

Re: [PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-19 Thread Peter Xu
On Thu, Nov 19, 2020 at 03:59:36PM +0300, Andrey Gruzdev via wrote: [...] > +/** > + * ram_find_block_by_host_address: find RAM block containing host page > + * > + * Returns true if RAM block is found and pss->block/page are > + * pointing to the given host page, false in case of an error > + *

[PATCH v3 3/7] support UFFD write fault processing in ram_save_iterate()

2020-11-19 Thread Andrey Gruzdev via
In this particular implementation the same single migration thread is responsible for both normal linear dirty page migration and procesing UFFD page fault events. Processing write faults includes reading UFFD file descriptor, finding respective RAM block and saving faulting page to the migration