From: Brendan Jackman <jackmanb@google.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: <akpm@linux-foundation.org>, <vbabka@suse.cz>,
<surenb@google.com>, <mhocko@suse.com>, <hannes@cmpxchg.org>,
<bp@alien8.de>, <tglx@linutronix.de>, <david@redhat.com>,
<ast@kernel.org>, <linux-mm@kvack.org>,
<linux-coco@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] mm/page_alloc: Ensure try_alloc_pages() plays well with unaccepted memory
Date: Wed, 07 May 2025 15:27:18 +0000 [thread overview]
Message-ID: <D9Q18PJT3Y7R.5Q9X3BZ0ESYU@google.com> (raw)
In-Reply-To: <hqd7h7elpou6mohkdr2rqcz6u7xuanezuq3ti56ibsnccsb2d2@yokitckdkwqo>
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().
next prev parent reply other threads:[~2025-05-07 15:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250506112509.905147-1-kirill.shutemov@linux.intel.com>
[not found] ` <20250506112509.905147-3-kirill.shutemov@linux.intel.com>
2025-05-06 12:43 ` [PATCH 2/2] mm/page_alloc: Fix race condition in unaccepted memory handling Borislav Petkov
[not found] ` <20250506112509.905147-2-kirill.shutemov@linux.intel.com>
2025-05-06 13:20 ` [PATCH 1/2] mm/page_alloc: Ensure try_alloc_pages() plays well with unaccepted memory Brendan Jackman
2025-05-06 13:34 ` Kirill A. Shutemov
2025-05-07 15:27 ` Brendan Jackman [this message]
2025-05-06 17:18 ` Alexei Starovoitov
2025-05-06 19:00 ` Kirill A. Shutemov
2025-05-06 22:05 ` Alexei Starovoitov
2025-05-07 11:13 ` Kirill A. Shutemov
2025-05-07 0:00 ` Andrew Morton
2025-05-07 11:31 ` Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D9Q18PJT3Y7R.5Q9X3BZ0ESYU@google.com \
--to=jackmanb@google.com \
--cc=akpm@linux-foundation.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=surenb@google.com \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox