From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 References: <20181126205351.GM3065@bombadil.infradead.org> <20181127105602.GC16502@rapoport-lnx> <010001675613a406-89de05df-ccf6-4bfa-ae3b-6f94148d514a-000000@email.amazonses.com> In-Reply-To: <010001675613a406-89de05df-ccf6-4bfa-ae3b-6f94148d514a-000000@email.amazonses.com> From: Linus Torvalds Date: Tue, 27 Nov 2018 08:58:30 -0800 Message-ID: Subject: Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org To: Christoph Lameter Cc: rppt@linux.ibm.com, Matthew Wilcox , Hugh Dickins , Andrew Morton , bhe@redhat.com, Michal Hocko , Vlastimil Babka , Andrea Arcangeli , david@redhat.com, mgorman@techsingularity.net, David Herrmann , Tim Chen , kan.liang@intel.com, Andi Kleen , Davidlohr Bueso , Peter Zijlstra , Nick Piggin , pifang@redhat.com, Linux List Kernel Mailing , linux-mm@kvack.org List-ID: On Tue, Nov 27, 2018 at 8:49 AM Christopher Lameter 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