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

Kristina Martšenko kristina.martsenko at arm.com
Fri Nov 6 03:02:17 PST 2026


On Thu, Oct 29, 2026 at 05:36:47PM +0530, Linu Cherian wrote:
> Hi Kristina,
> 
> On Thu, Oct 01, 2026 at 12:06:43PM +0100, Kristina Martšenko wrote:
> > Hi,
> > 
> > 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
> 
> Lets say if we have a TLB domain of 8 cpus and a process has ran on only
> one cpu, dont we end up broadcasting to all cpus in the domain as the 
> granularity is at the domain level ?
> If thats true, would be good to make that clear.

Yes that’s true. Linux can’t change the domains and the smallest domain
can contain 8 (or more) CPUs. I’ll add a note about it in the cover
letter to make it clear.

> > patch explains a bit about how it works. This is an RFC since I'm not familiar
> > with the kernel's TLB/mm code and I'd like feedback on whether the general
> > approach is correct.
> > 
> > A few notes and open questions:
> > 
> >   * Domains are described in a new "TLBI" ACPI table. This is not yet part of
> >     the ACPI specification. There was an initial proposal [2] but this series
> >     uses a newer WIP version of the table that aims to be published by the end
> >     of the year.
> > 
> >   * There is currently no device tree binding since the feature is mainly meant
> >     for server-class systems.
> > 
> >   * It's also possible to use TLBI domains to limit a KVM guest's TLB
> >     invalidations to CPUs where the guest has run. I'll try to include that in
> >     the next version. This series only disables domains for guests.
> > 
> >   * With this series a long-running process may eventually run on all CPUs and
> >     just issue broadcast TLBIs. It may be worth periodically reducing the set
> >     of CPUs but it's not clear when.
> 
> Do you have some thoughts on how we could reduce the set of cpus, to avoid
> cross domain scheduling ? 
> IIUC, this should me more of a scheduling decision with domain awareness. 

Sorry, the wording is unclear here. This is not about reducing the set
of CPUs that a process runs on, it’s about optimizing the domain bitmap
of a process such that it only contains CPUs that the process is active
on. Currently we only remove domains from the bitmap but never put them
back, even if the process is no longer running on a given CPU and its
TLB has been flushed. So we may end up removing all domains except the
broadcast-all domain.

This isn’t trying to avoid cross-domain scheduling or to change
scheduling at all.

Also, having thought about it some more, I’m not sure if this series
should try to optimize the domain bitmap at all, since it will require
synchronizing with the domain update in switch_mm(), which will add
overhead and needs to be benchmarked on TLBID hardware first (which we
don’t have yet).

Thanks,
Kristina



More information about the linux-arm-kernel mailing list