Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated

From: Linus Torvalds
Date: Tue Nov 27 2018 - 11:58:54 EST


On Tue, Nov 27, 2018 at 8:49 AM Christopher Lameter <cl@xxxxxxxxx> wrote:
>
> A process has no refcount on a page struct and is waiting for it to become
> unlocked? Why? Should it not simply ignore that page and continue?

The problem isn't that you can just "continue".

You need to *retry*.

And you can't just busy-loop. You want to wait until the page state
has changed, and _then_ retry.

Linus