All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Will Deacon <will@kernel.org>
Cc: Yabin Cui <yabinc@google.com>, Dev Jain <dev.jain@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	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: Fri, 6 Nov 2026 09:35:51 +0000	[thread overview]
Message-ID: <20261106093551.GW9176@e132581.arm.com> (raw)
In-Reply-To: <aussIYUR1BGfUzqn@willie-the-truck>

On Wed, Nov 04, 2026 at 12:59:13PM +0000, Will Deacon wrote:

[...]

> > Sorry for the late reply, and sorry that the commit message in
> > 18049c8cff9c ("perf/aux: Allocate non-contiguous AUX pages by default")
> > was imprecise about "exacerbating memory fragmentation". You and Dev are
> > right that grouping same-lifetime pages into higher-order allocations
> > does not itself worsen fragmentation, and the TLB reduction numbers for
> > TRBE and SPE with large vmap() mappings make total sense given TRBE's
> > tiny TLB.
> > 
> > However, a straight revert will reintroduce a severe production issue we
> > hit on Android devices, so I'd like to share what actually happened and
> > suggest a way to get large mappings for SPE/TRBE without bringing back
> > the regression.
> 
> [...]
> 
> Thanks, Yabin. This just hardens my stance [1] that the allocation decision
> should be driven by userspace and not second-guessed by the kernel. So the
> revert is _not_ the right approach, in my view.

If a userspace interface is needed, what remaining reclaim or allocation
policy should userspace control? I am not clear how userspace control
would fix the PSI reclaim stalls described in Yabin's reply.

Alternatively, we could optimize the reported reclaim cost in the kernel
by clearing __GFP_RECLAIM for optional higher-order attempts, while
preserving the existing policy at order 0 and for
PERF_PMU_CAP_AUX_NO_SG PMUs.

If testing confirms this works, combining this mitigation with a revert
of 18049c8cff9c would be a reasonable way to restore higher-order
allocations for SPE/TRBE without adding a userspace interface.

Thanks,
Leo

  reply	other threads:[~2026-11-06  9:35 UTC|newest]

Thread overview: 15+ 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-25 16:31 ` sashiko-bot
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 [this message]
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
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=20261106093551.GW9176@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 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.