From: Marc Zyngier <maz@kernel.org>
To: Usama Arif <usama.arif@linux.dev>
Cc: oupton@kernel.org, fuad.tabba@linux.dev, joey.gouly@arm.com,
seiden@linux.ibm.com, suzuki.poulose@arm.com,
yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org,
mark.rutland@arm.com, kvmarm@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, riel@surriel.com,
shakeel.butt@linux.dev, kernel-team@meta.com, rkeilty@meta.com,
atish.patra@linux.dev, dgreid@meta.com,
Lorenzo Stoakes <ljs@kernel.org>
Subject: Re: [PATCH] KVM: arm64: Reduce the stage-2 page cache on 64 KiB hosts
Date: Thu, 26 Nov 2026 15:58:11 +0000 [thread overview]
Message-ID: <86v75jy48c.wl-maz@kernel.org> (raw)
In-Reply-To: <563d2406-dcfe-43b6-8f21-2a7694f1f266@linux.dev>
On Thu, 26 Nov 2026 14:32:04 +0000,
Usama Arif <usama.arif@linux.dev> wrote:
[nonsense deleted]
> > Now, to the patch itself: I see no reason to special-case this. If
> > kvm_mmu_cache_min_pages() is an indication of what is needed, then
> > this macro should be driven by it, or the whole allocator take it into
> > account. And then you adjust it by whatever fudge factor seems
> > appropriate.
> >
>
> Completely agree! [1] does that: no page-size special case, and
> a capacity of KVM_PGTABLE_LAST_LEVEL - KVM_PGTABLE_FIRST_LEVEL for every
> page size. It can't track kvm_mmu_cache_min_pages()
> at runtime: the vCPU's cache is shared by the canonical and NV shadow
> MMUs, and its capacity must stay fixed. So it has to cover the largest
> minimum, which stage-2 caps at 3, and 4 is that plus one page of fudge.
Of course it can. That's not exactly rock science to add, rather than
relying on another set of bad heuristics. And this must cover more
than a single mapping per top-up, because that has a ripple effect on
the speed at which we can split large blocks (funnily enough, people
care about that stuff).
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2026-11-26 16:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 15:28 [PATCH] KVM: arm64: Reduce the stage-2 page cache on 64 KiB hosts Usama Arif
2026-11-25 17:14 ` Leonardo Bras
2026-11-25 17:55 ` Usama Arif
2026-11-25 18:25 ` Leonardo Bras
2026-11-25 21:42 ` Usama Arif
2026-11-26 8:06 ` Wei-Lin Chang
2026-11-26 15:19 ` Leonardo Bras
2026-11-26 15:34 ` Wei-Lin Chang
2026-11-26 15:55 ` Leonardo Bras
2026-11-26 16:45 ` Lorenzo Stoakes (ARM)
2026-11-26 16:30 ` Lorenzo Stoakes (ARM)
2026-11-26 12:56 ` Marc Zyngier
2026-11-26 14:32 ` Usama Arif
2026-11-26 15:58 ` Marc Zyngier [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=86v75jy48c.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=atish.patra@linux.dev \
--cc=catalin.marinas@arm.com \
--cc=dgreid@meta.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kernel-team@meta.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=mark.rutland@arm.com \
--cc=oupton@kernel.org \
--cc=riel@surriel.com \
--cc=rkeilty@meta.com \
--cc=seiden@linux.ibm.com \
--cc=shakeel.butt@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=usama.arif@linux.dev \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.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