From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Anthony PERARD <anthony.perard@vates.tech>,
Michal Orzel <michal.orzel@amd.com>,
Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/2] x86/numa: introduce per-NUMA node flush locks
Date: Wed, 4 Jun 2025 17:13:03 +0200 [thread overview]
Message-ID: <aEBif3V6tkBOIz96@macbook.local> (raw)
In-Reply-To: <2c120e48-edaa-4518-a92e-38872bfc6eac@suse.com>
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.
prev parent reply other threads:[~2025-06-04 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 8:48 [PATCH 0/2] x86/numa: introduce per-node flush_lock Roger Pau Monne
2025-05-22 8:48 ` [PATCH 1/2] x86/numa: add per-node lock profile objects Roger Pau Monne
2025-06-04 12:43 ` Jan Beulich
2025-05-22 8:48 ` [PATCH 2/2] x86/numa: introduce per-NUMA node flush locks Roger Pau Monne
2025-06-04 12:35 ` Jan Beulich
2025-06-04 15:03 ` Roger Pau Monné
2025-06-04 15:07 ` Jan Beulich
2025-06-04 12:42 ` Jan Beulich
2025-06-04 15:13 ` Roger Pau Monné [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=aEBif3V6tkBOIz96@macbook.local \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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.