From: Dev Jain <dev.jain@arm.com>
To: Kiryl Shutsemau <kas@kernel.org>
Cc: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Harry Yoo <harry@kernel.org>, Usama Arif <usama.arif@linux.dev>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <brendan.jackman@linux.dev>,
Zi Yan <ziy@nvidia.com>, Shakeel Butt <shakeel.butt@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH v3] mm: page_alloc: make defrag_mode retries follow the promoted order
Date: Wed, 28 Oct 2026 12:32:14 +0530 [thread overview]
Message-ID: <adc41db6-16b7-449c-b883-8b093309db8c@arm.com> (raw)
In-Reply-To: <auCDnqJc7fsBpUW2@thinkstation>
On 27/10/26 4:30 pm, Kiryl Shutsemau wrote:
> On Tue, Oct 27, 2026 at 12:42:12PM +0530, Dev Jain wrote:
>>
>>
>> On 23/10/26 8:16 pm, Kiryl Shutsemau wrote:
>>> On Fri, Oct 23, 2026 at 01:12:02PM +0100, Kiryl Shutsemau wrote:
>>>> The diff below replaces the previous one. It needs cleanup and splitting
>>>> before it goes upstream.
>>>
>>> Proper patchset:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git page_alloc/nofrag-watermark-v1
>>>
>>
>> Thanks! I applied the 3 commits on top and the results improved a lot. Your patches
>> make sense to me.
>
> Thanks for testing.
>
> Can I use your Tested-by?
Sure! Do Cc me whenever you send. I'll try reviewing if I am not on vacation : )
>
>> But still, I see more compact_stalls and a worse compaction success:fail ratio. The
>> limitation must be by definition I believe: we still won't be able to use 64K blocks
>> from non-movable pageblocks.
>
> Right, that is by design.
>
> defrag_mode keeps the free space in unmovable and reclaimable blocks for
> those allocations, so they don't spill into movable blocks. Your 64K
> faults never take it.
>
> The price is that defrag_mode needs more free memory for the same
> workload. In return, the system does not fragment over time: huge page
> availability stays steady instead of decaying under load.
Right.
>
> The benchmark runs right at the edge: it fills 99% of MemAvailable and
> then faults another 20% in 64K. defrag_mode=0 takes the 64K chunks it
> finds in non-movable blocks without compacting. defrag_mode=1 has to
> build them inside movable blocks, and with memory full there is little
> free space there. So more compaction, and more of it fails.
>
> The 64K fault count ends up close anyway: 20.1k vs 20.7k in my runs.
Yep, the issue is that Android folks may complain - they observe increased power
consumption due to reclaim stalls and compaction stalls and would like to
minimize them.
I would really want to see defrag_mode become the default since it attacks
the major cause of fragmentation nicely, but the assumption is that compaction
is a free resource, unfortunately on smaller devices that's not the case.
next prev parent reply other threads:[~2026-10-28 7:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 12:55 Kiryl Shutsemau (Meta)
2026-10-09 14:05 ` Usama Arif
2026-10-10 22:49 ` Andrew Morton
2026-10-12 10:17 ` Kiryl Shutsemau
2026-10-12 11:40 ` Vlastimil Babka (SUSE)
2026-10-13 2:28 ` Andrew Morton
2026-10-13 17:37 ` Kiryl Shutsemau
2026-10-13 18:15 ` Vlastimil Babka (SUSE)
2026-10-14 20:29 ` Johannes Weiner
2026-10-15 7:16 ` Vlastimil Babka (SUSE)
2026-10-15 12:55 ` Kiryl Shutsemau
2026-10-15 13:53 ` Vlastimil Babka (SUSE)
2026-10-15 14:39 ` Kiryl Shutsemau
2026-10-19 6:58 ` Dev Jain
2026-10-21 9:33 ` Kiryl Shutsemau
2026-10-23 6:39 ` Dev Jain
2026-10-23 10:59 ` Kiryl Shutsemau
2026-10-23 12:11 ` Kiryl Shutsemau
2026-10-23 14:46 ` Kiryl Shutsemau
2026-10-27 7:12 ` Dev Jain
2026-10-27 11:00 ` Kiryl Shutsemau
2026-10-28 7:02 ` Dev Jain [this message]
2026-10-15 12:50 ` Kiryl Shutsemau
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=adc41db6-16b7-449c-b883-8b093309db8c@arm.com \
--to=dev.jain@arm.com \
--cc=akpm@linux-foundation.org \
--cc=brendan.jackman@linux.dev \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=harry@kernel.org \
--cc=kas@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=shakeel.butt@linux.dev \
--cc=stable@vger.kernel.org \
--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
all inboxes | Powered by JetHome®