[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] x86/numa: introduce per-NUMA node flush locks



On Wed, Jun 04, 2025 at 02:42:45PM +0200, Jan Beulich wrote:
> On 22.05.2025 10:48, Roger Pau Monne wrote:
> > +bool flush_numa_node(const cpumask_t *mask, const void *va, unsigned int 
> > flags)
> > +{
> > +    nodeid_t node = num_online_nodes() > 1 ? cpumask_to_node(mask)
> > +                                           : NUMA_NO_NODE;
> > +    struct arch_numa_node *info;
> > +
> > +    if ( node == NUMA_NO_NODE )
> > +        return false;
> 
> One further question: Here you limit NUMA flushing to a single node, using
> global flushes in all other cases. Did you consider extending this?

I did consider it, my first through was that such approach would
require taking multiple per-node locks at the same time, and so was
not worth pursuing.

I now realize however that we can decompose multi-node flushes into
per-node actions, and execute them sequentially, taking just one
per-node lock for each action.  I can see into doing this.  I'm unsure
whether such decomposing into sequential per-node flushes won't add
more latency (even if reducing contention).

As you say below, that way we would avoid having to allocate an extra
vector.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.