From: Leo Yan <leo.yan@arm.com>
To: Dev Jain <dev.jain@arm.com>
Cc: Will Deacon <will@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Mike Leach <mike.leach@arm.com>,
James Clark <james.clark@linaro.org>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Tamas Petz <tamas.petz@arm.com>,
Tamas Zsoldos <tamas.zsoldos@arm.com>,
Michiel van Tol <michiel.vantol@arm.com>,
David Hildenbrand <david@kernel.org>,
Yabin Cui <yabinc@google.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 2/2] perf: arm_spe: Prefer large AUX mappings
Date: Tue, 20 Oct 2026 17:25:10 +0100 [thread overview]
Message-ID: <20261020162510.GF26205@e132581.arm.com> (raw)
In-Reply-To: <7c35e399-bc64-43c3-9588-672200758ea5@arm.com>
On Thu, Oct 08, 2026 at 04:13:27PM +0530, Dev Jain wrote:
>
> >>> Commit 18049c8cff9c ("perf/aux: Allocate non-contiguous AUX pages by
> >>> default") made the AUX allocator use order-0 pages by default unless a
> >>> PMU explicitly asks for contiguous allocations.
> >>
> >> But that commit specifically calls out SPE as benefitting from
> >> non-contiguous pages:
> >>
> >> "For instance, ARM SPE and TRBE operate with virtual pages, and
> >> Coresight ETR allocates a separate buffer. For these PMUs,
> >> allocating contiguous AUX pages unnecessarily exacerbates memory
> >> fragmentation. This fragmentation can prevent their use on
> >> long-running devices."
> >>
> >> so why doesn't passing PERF_PMU_CAP_AUX_PREFER_LARGE reintroduce the
> >> problems that 18049c8cff9c was trying to solve?
> I don't have the full context here (can look in detail later) so drive-by comment:
>
> In general, doing large order allocations should *reduce* fragmentation. If you allocate
> 16 order-0 pages as opposed to an order-4 compound page, you may end up spreading your
> allocations across different blocks, thus preventing them from merging later.
>
> A recent example can be found in vmalloc [1].
>
> [1] https://lore.kernel.org/all/aPjrRkjiIt6HmXmT@casper.infradead.org/
Thanks, Dev. Roughly read the shared link, larger allocations can keep
pages with the same lifetime together, so order-0 allocation is not
necessarily better for fragmentation.
As mentioned in my other reply, the AUX buffer allocator already used
__GFP_NORETRY before the commit 18049c8cff9c, so those allocations do
not directly invoke the kernel OOM killer.
This calls for revisiting that rationale in 18049c8cff9c. The original
issue does not appear to have been investigated sufficiently, and we
still haven't received further details since this series.
I propose reverting 18049c8cff9c to restore the previous allocation
policy. If no objections, I will send a revert for review.
Thanks,
Leo
next prev parent reply other threads:[~2026-10-20 16:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 14:44 [PATCH 0/2] perf/arm: Prefer large AUX mappings for CoreSight and SPE Leo Yan
2026-08-10 14:44 ` [PATCH 1/2] coresight: perf: Prefer large AUX mappings Leo Yan
2026-08-10 14:44 ` [PATCH 2/2] perf: arm_spe: " Leo Yan
2026-08-10 15:10 ` Will Deacon
2026-08-10 17:41 ` Leo Yan
2026-08-11 9:02 ` James Clark
2026-08-11 10:17 ` Leo Yan
2026-09-01 17:06 ` Leo Yan
2026-10-08 10:43 ` Dev Jain
2026-10-20 16:25 ` Leo Yan [this message]
2026-09-30 16:43 ` Leo Yan
2026-10-01 7:16 ` Will Deacon
2026-10-05 17:41 ` Leo Yan
2026-10-06 16:14 ` Will Deacon
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=20261020162510.GF26205@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=coresight@lists.linaro.org \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=james.clark@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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=peterz@infradead.org \
--cc=suzuki.poulose@arm.com \
--cc=tamas.petz@arm.com \
--cc=tamas.zsoldos@arm.com \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.