On Fri, Oct 20, 2023 at 09:48:54AM -0300, Fabiano Rosas wrote: > > If pending_job == 0 -> owner of the channel is migration_thread and it > > can use it. > > > > If pending_job > 0 -> owner of the channel is the channel thread and > > migration_thread can't use it. > > Do you really mean "migration_thread" here or just multifd_send_pages()? > Because multifd_send_sync_main() doesn't care about this ownership > rule. Does that mean that code is incorrect?
Yes, that's also what I was referring as the confusion, too. [...] > It's a semantic issue really, but I'd rather we avoid locking ourselves > more into the "pages" idea for multifd threads. The data being sent by > the multifd thread should be opaque. I've put these ideas into a RFC patchset here: [PATCH RFC 0/7] migration/multifd: quit unitifications and separate sync packet I kept it "pending_job" there, avoid using "pages" as a name. Fabiano, I have a patch there that dropped p->quit, so there will be crossovers with your patchset. I tried to leave that alone, but found I'd better clean that up when add the send thread helpers. Let's see how it goes.. Thanks, -- Peter Xu