The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: JP Kobryn <jp.kobryn@linux.dev>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
	akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
	liam@infradead.org, rppt@kernel.org, surenb@google.com,
	mhocko@suse.com, jackmanb@google.com, hannes@cmpxchg.org,
	ziy@nvidia.com, fvdl@google.com, linux-mm@kvack.org
Cc: shakeel.butt@linux.dev, usama.arif@linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_alloc: use existing highatomic reserves on the buddy fastpath
Date: Wed, 17 Jun 2026 10:35:43 -0700	[thread overview]
Message-ID: <9370ec06-417c-46e1-8874-2613cdd6372b@linux.dev> (raw)
In-Reply-To: <fa69e7f3-45da-4722-b47f-e6fcd38717c7@kernel.org>

On 6/17/26 6:02 AM, Vlastimil Babka (SUSE) wrote:
> On 6/16/26 21:14, JP Kobryn wrote:
>> ALLOC_HIGHATOMIC currently provides both access to MIGRATE_HIGHATOMIC free
>> pages and permission to create new highatomic pageblock reserves. This
>> makes it unsuitable for the fastpath.
>>
>> However, the fastpath can reach rmqueue_buddy() while MIGRATE_HIGHATOMIC
>> reserves have free pages available. In this situation, the allocation can
>> fall back to other migratetypes without trying those reserves first.
>>
>> Allow high-priority non-blocking allocations above order-0 and up to the
>> costly order to use existing MIGRATE_HIGHATOMIC reserves on the buddy
>> fastpath without granting permission to grow these reserves. Add
>> ALLOC_HIGHATOMIC_RESERVE for allocations that may both access
>> MIGRATE_HIGHATOMIC and grow the reserves. Change the semantics of
>> ALLOC_HIGHATOMIC so that it may only access the reserves.
>>
>> A UDP receive workload was run with free MIGRATE_HIGHATOMIC pageblocks
>> available in the target zone. Before this patch, the workload did not
>> consume these blocks. With this patch, comparable runs consumed available
>> blocks for 96-100% of eligible order-1 atomic allocations reaching the
>> buddy path, with no highatomic misses observed. The workload did not grow
>> highatomic reserves and NAPI page-frag allocations remained healthy with no
>> failures or order-0 fallbacks.
> 
> Great.
> 
>> Signed-off-by: JP Kobryn <jp.kobryn@linux.dev>
> 
> LGTM, I have just one style suggestion. If you agree and apply it, feel free
> to add:
> 
> Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>

Thanks for the quick review.

> 
> ... and (unless other reviews raise something) send v2 rebased to 7.2-rc1
> once it's released. Thanks!
> 
>> ---
>>  mm/internal.h   |  4 +++-
>>  mm/page_alloc.c | 34 +++++++++++++++++++++++++++-------
>>  2 files changed, 30 insertions(+), 8 deletions(-)
>>
[...]
> 
> And only here add both ALLOC_HIGHATOMIC and ALLOC_HIGHATOMIC_RESERVE.
> I.e. ALLOC_HIGHATOMIC_RESERVE would not be a superset of ALLOC_HIGHATOMIC,
> but access to reserves and ability to grow them would be decoupled. The
> comments on the flags actually suggest that's the case.

I like this idea and will decouple in v2.

      reply	other threads:[~2026-06-17 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 19:14 [PATCH] mm/page_alloc: use existing highatomic reserves on the buddy fastpath JP Kobryn
2026-06-17 13:02 ` Vlastimil Babka (SUSE)
2026-06-17 17:35   ` JP Kobryn [this message]

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=9370ec06-417c-46e1-8874-2613cdd6372b@linux.dev \
    --to=jp.kobryn@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=fvdl@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=jackmanb@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=usama.arif@linux.dev \
    --cc=vbabka@kernel.org \
    --cc=ziy@nvidia.com \
    /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