[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8735l3k3hu.fsf@mid.deneb.enyo.de>
Date: Mon, 31 Jan 2022 22:19:09 +0100
From: Florian Weimer <fw@...eb.enyo.de>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
"Paul E . McKenney" <paulmck@...nel.org>,
Boqun Feng <boqun.feng@...il.com>,
"H . Peter Anvin" <hpa@...or.com>, Paul Turner <pjt@...gle.com>,
linux-api@...r.kernel.org,
Christian Brauner <christian.brauner@...ntu.com>,
David.Laight@...LAB.COM, carlos@...hat.com,
Peter Oskolkov <posk@...k.io>
Subject: Re: [RFC PATCH 1/2] rseq: extend struct rseq with numa node id
* Mathieu Desnoyers:
> Adding the NUMA node id to struct rseq is a straightforward thing to do,
> and a good way to figure out if anything in the user-space ecosystem
> prevents extending struct rseq.
>
> This NUMA node id field allows memory allocators such as tcmalloc to
> take advantage of fast access to the current NUMA node id to perform
> NUMA-aware memory allocation.
>
> It is also useful for implementing NUMA-aware user-space mutexes.
It can be used to implement getcpu purely in userspace, too. I had
plan to hack this together with a node ID cache in TLS, which should
offer pretty much the same functionality (except for weird CPU
topology changes which alter the node ID of a previously used CPU).
However, I do not understand the need for two fields here. Why isn't
one enough?
One field would also avoid the need to mess with rseq_cpu_id_state,
maintaining API compatibility.
Powered by blists - more mailing lists