[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <D9Q18PJT3Y7R.5Q9X3BZ0ESYU@google.com>
Date: Wed, 07 May 2025 15:27:18 +0000
From: Brendan Jackman <jackmanb@...gle.com>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: <akpm@...ux-foundation.org>, <vbabka@...e.cz>, <surenb@...gle.com>,
<mhocko@...e.com>, <hannes@...xchg.org>, <bp@...en8.de>, <tglx@...utronix.de>,
<david@...hat.com>, <ast@...nel.org>, <linux-mm@...ck.org>,
<linux-coco@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] mm/page_alloc: Ensure try_alloc_pages() plays well
with unaccepted memory
On Tue May 6, 2025 at 1:34 PM UTC, Kirill A. Shutemov wrote:
> On Tue, May 06, 2025 at 01:20:25PM +0000, Brendan Jackman wrote:
>> On Tue May 6, 2025 at 11:25 AM UTC, Kirill A. Shutemov wrote:
>> > + /* Bailout, since try_to_accept_memory_one() needs to take a lock */
>> > + if (alloc_flags & ALLOC_TRYLOCK)
>> > + return false;
>> > +
>>
>> Quick lazy question: why don't we just trylock it like we do for the zone
>> lock?
>
> It is not only zone lock. There's also unaccepted_memory_lock inside
> accept_memory().
Right, but my lazy question was why can't we "just" trylock that too?
But anyway, that's no use because if we win the trylock we'd still have
to do __free_pages_ok().
Powered by blists - more mailing lists