Thread (20 messages) 20 messages, 7 authors, 6d ago

Re: [RFC 00/12] arm64: Add support for TLBI domains

flat view

From: Zi Yan <ziy@nvidia.com>
Date: 2026-10-05 18:14:07
Also in: kvmarm, linux-acpi, linux-efi, linux-mm

On 5 Oct 2026, at 2:29, Will Deacon wrote:
On Sun, Oct 04, 2026 at 02:06:48PM -0400, Zi Yan wrote:
quoted
On Thu Oct 1, 2026 at 7:06 AM EDT, Kristina Martšenko wrote:
quoted
This series allows the kernel to use TLBI domains. TLBI domains (FEAT_TLBID) is
an Arm architecture feature that enables a TLB invalidation to target a subset
of CPUs instead of the whole system. It can improve performance on systems with
many CPUs. TLBID is not yet part of the Arm Architecture Reference Manual but
some of it is described in the latest XML [1].

The goal of this series is to send TLBI commands only to the CPUs where a
process has run (i.e. where its page tables have been installed). The last
IIUC, mm_cpumask() is used to store this information on x86 and other
archs. I see you put this information in tlbid_domains of mm_context_t
from patch 9, although in the form of tlb id domains. I wonder why not
make arm64 also update mm_cpumask() like x86 and other archs and derive
the tlbid domains based on mm_cpumask() and a cpu-to-domain mapping
(added in patch 7).
Historically, maintaining mm_cpumask() was a horrible source of contention
when we looked at it in the past. Maybe that's no longer true, but it
Do you have a pointer to the cost you have in mind? LLM can only finds some
overhead reduction work done by Rik for x86[1][2].

[1] https://lore.kernel.org/all/20180716190337.26133-8-riel@surriel.com/T/#u (local)
[2] https://lore.kernel.org/all/20241114152723.1294686-2-riel@surriel.com/ (local)

BTW, patch 9 is updating tlbid domains unconditionally. It can be optimized
in the same way as Rik did for x86 mm_cpumask(), read the tlbid domain first
and only update if CPU is in a new domain.
would be good to see some numbers if we want to start keeping that thing
accurate on arm64.

Best Regards,
Yan, Zi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help