From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [RFC PATCH 0/5] futex: introduce an optimistic spinning futex Date: Tue, 22 Jul 2014 10:39:17 +0200 (CEST) Message-ID: References: <871tte3bjw.fsf@tassilo.jf.intel.com> <20140721212740.GS3935@laptop> <20140721213457.46623e2f@gandalf.local.home> <20140722074719.GV3935@laptop> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <20140722074719.GV3935@laptop> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Peter Zijlstra Cc: Steven Rostedt , Darren Hart , Andy Lutomirski , Andi Kleen , Waiman Long , Ingo Molnar , Davidlohr Bueso , Heiko Carstens , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Linux API , "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Jason Low , Scott J Norton , Robert Haas List-Id: linux-api@vger.kernel.org On Tue, 22 Jul 2014, Peter Zijlstra wrote: > Anyway, there is one big fail in the entire futex stack that we 'need' > to sort some day and that is NUMA. Some people (again database people) > explicitly do not use futexes and instead use sysvsem because of this. > > The problem with numa futexes is that because they're vaddr based there > is no (persistent) node information. You always end up having to fall > back to looking in all nodes before you can guarantee there is no > matching futex. > > One way to achieve it is by extending the futex value to include a node > number, but that's obviously a complete ABI break. Then again, it should > be pretty straight fwd, since the node number doesn't need to be part of > the actual atomic update part, just part of the userspace storage. So you want per node hash buckets, right? Fair enough, but how do you make sure, that no thread/process on a different node is fiddling with that "node bound" futex as well? Thanks, tglx