From: Leo Yan <leo.yan@arm.com>
To: Yabin Cui <yabinc@google.com>
Cc: Dev Jain <dev.jain@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Thomas Gleixner <tglx@kernel.org>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@arm.com>,
James Clark <james.clark@linaro.org>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Tamas Petz <tamas.petz@arm.com>,
Tamas Zsoldos <tamas.zsoldos@arm.com>,
Michiel van Tol <michiel.vantol@arm.com>,
coresight@lists.linaro.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "perf/aux: Allocate non-contiguous AUX pages by default"
Date: Mon, 23 Nov 2026 15:21:38 +0000 [thread overview]
Message-ID: <20261123152138.GD9176@e132581.arm.com> (raw)
In-Reply-To: <CALJ9ZPObeFj0mm8ahwCa-ePYHXU2nE=hvPW97bStH2mX7RvqnA@mail.gmail.com>
On Thu, Nov 19, 2026 at 01:00:03PM -0800, Yabin Cui wrote:
[...]
> Hi Leo, Dev,
>
> I tested on an arm64 Android Pixel device (4 KiB pages, 12 GiB RAM +
> 6 GiB zram, TRBE & SPE) using an Android kernel patched locally to match
> v7.4-rc3's rb_alloc_aux() / __alloc_pages_slowpath() behavior
> (526d945ad9c0, 669872181549, 53a9b4646f67, 0e05a469c294).
>
> v7.4-rc3 alone still causes heavy PSI and compaction/reclaim stalls on
> Android, while patch [1] keeping __GFP_NORETRY fixes it completely.
>
> compact-bench (90/95/99%, 10 runs each = 30 runs, 4 MiB/CPU TRBE AUX,
> 0 allocation failures; system-wide PSI since Android sets
> cgroup_disable=pressure):
>
> Config PSI some(ms) cmp_stall allocstall daemon_wake sp_kswapd_wk
> order-0 297.76 0 0 0 0
> revert 2,578.00 3,957 1,984 17 28
> v7.4-rc3-sim 1,840.29 522 161 14 21
> rc3 + [1] 270.77 0 0 0 0
> rc3 + [1]-noretry 41.78 0 0 0 1
It's good to see no allocation failures and much lower PSI with
rc3 + [1]-noretry.
> Even when order-3 pages are still plentiful (e.g. 95%, where order-3
> never failed and cmp_stall/allocstall were 0), v7.4-rc3-sim still
> woke kswapd/kcompactd for failed orders 4..9 on 10/10 runs (7
> kcompactd wakes), producing 895.48 ms PSI vs. 2.87 ms with
> [1]-noretry.
>
> When order-3 does run out (99% Run 1), v7.4-rc3-sim bypasses
> 0e05a469c294 and hits 521 direct compactions / 161 direct reclaims
> (Runs 2..10 dropped to 1/0 by reusing freed AUX pages; that only
> helps when traces run back-to-back in a short window, which doesn't
> match our use case on Android).
I see that v7.4-rc3-sim (or with equivalent mainline kernel) can still
show increased PSI.
> Under a realistic Android fragmentation test (incompressible zram
> pages, unmovable pages, re-fragmented between runs), v7.4-rc3-sim also
> triggered an lmkd kill (TRBE) and direct compaction/reclaim stalls
> (SPE), all 0 with [1]-noretry.
>
> When unfragmented, [1]-noretry still allocates 100% order-9 (2 MiB)
> chunks for both TRBE and SPE.
>
> So I agree with Dev to drop __GFP_RETRY_MAYFAIL and keep __GFP_NORETRY
> (0 allocation failures and lower PSI). Please proceed with v2 of [1]
> keeping __GFP_NORETRY (and avoid backporting 526d945ad9c0 to
> stable without it).
I don't expect 526d945ad9c0 to be backported to stable kernels, as it
has no Fixes tag. We just need to ensure that mainline and future LTS
kernels (and ACK) avoid PSI regressions..
I'll send v2 with keeping __GFP_NORETRY as you and Dev suggested.
Thanks a lot, Yabin and Dev!
Leo
next prev parent reply other threads:[~2026-11-23 15:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 16:24 [PATCH] Revert "perf/aux: Allocate non-contiguous AUX pages by default" Leo Yan
2026-10-26 10:14 ` James Clark
2026-10-29 6:56 ` Dev Jain
[not found] ` <CALJ9ZPNWcDtajO+Luhxe1K3af64mPRFQSjvfvNornyFFkam-+g@mail.gmail.com>
2026-11-03 20:46 ` Yabin Cui
2026-11-04 12:59 ` Will Deacon
2026-11-06 9:35 ` Leo Yan
2026-11-05 17:35 ` Leo Yan
2026-11-06 0:55 ` Yabin Cui
2026-11-15 15:02 ` Dev Jain
2026-11-18 16:57 ` Leo Yan
2026-11-19 7:43 ` Dev Jain
2026-11-19 21:00 ` Yabin Cui
2026-11-23 15:21 ` Leo Yan [this message]
2026-11-06 9:50 ` [tip: perf/urgent] " tip-bot2 for Leo Yan
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=20261123152138.GD9176@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=anshuman.khandual@arm.com \
--cc=bp@alien8.de \
--cc=coresight@lists.linaro.org \
--cc=dave.hansen@linux.intel.com \
--cc=dev.jain@arm.com \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=michiel.vantol@arm.com \
--cc=mike.leach@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=suzuki.poulose@arm.com \
--cc=tamas.petz@arm.com \
--cc=tamas.zsoldos@arm.com \
--cc=tglx@kernel.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=yabinc@google.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