[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wgwf_JUS+0kQas8SWLs3bkpF55xCoWPOACFsdgwonuZ8g@mail.gmail.com>
Date: Sat, 19 Dec 2020 12:08:21 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: Matthew Wilcox <willy@...radead.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Will Deacon <will@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Catalin Marinas <catalin.marinas@....com>,
Jan Kara <jack@...e.cz>, Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Vinayak Menon <vinmenon@...eaurora.org>,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting
On Sat, Dec 19, 2020 at 4:41 AM Kirill A. Shutemov <kirill@...temov.name> wrote:
>
> Okay, but we only win the NULL check. xas_retry() and xa_is_value() has to
> be repeated in the beginning of the loop.
Yeah.
I wonder if it might make sense to have a "xas_next_entry_rcu()"
function that does something like
while ((entry = xas_next_entry(&xas, end)) != NULL) {
if (xas_retry(entry) || xa_is_value(entry))
continue;
return entry;
}
return NULL;
but that's a question for Willy, and independent of this patch.
I like the patch, and I'll think about it a bit more, but I might
decide to just apply it to get this thing over with.
Otherwise it should probably go into -mm for more testing.
Linus
Powered by blists - more mailing lists