From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752701AbcEKVIF (ORCPT ); Wed, 11 May 2016 17:08:05 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:33508 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751617AbcEKVIC (ORCPT ); Wed, 11 May 2016 17:08:02 -0400 Date: Wed, 11 May 2016 14:08:00 -0700 From: Darren Hart To: Thomas Gleixner Cc: LKML , Sebastian Andrzej Siewior , Linus Torvalds , Darren Hart , Peter Zijlstra , Ingo Molnar , Michael Kerrisk , Davidlohr Bueso , Chris Mason , "Carlos O'Donell" , Torvald Riegel , Eric Dumazet Subject: Re: [patch V2 2/7] futex: Hash private futexes per process Message-ID: <20160511210800.GE4225@f23x64.localdomain> References: <20160505204230.932454245@linutronix.de> <20160505204353.973009518@linutronix.de> <20160506180933.GE48432@f23x64.localdomain> <20160506215634.GH48432@f23x64.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 07, 2016 at 10:45:57AM +0200, Thomas Gleixner wrote: > On Fri, 6 May 2016, Darren Hart wrote: > > It would be good to have a way to detect that the process private hash table was > > > successfully created. Perhaps a /proc/pid/ feature? This would allow us to write > > > a functional futex test for tools/testing/selftests/futex > > > > I suppose we could just use FUTEX_PREALLOC_HASH for this purpose, passing in the > > default hash size. This will either return the default, the previously set > > value, or 0, indicating the global hash is being used. That should be sufficient > > for programatically determining the state of the system. > > Right. > > > The /proc/pid/futex_hash_size option may still be convenient for other purposes. > > Perhaps with a -1 indicating it hasn't been set yet. > > Dunno, whether that's valuable, but it can be done on top. Agreed. We can leave that to the kselftest patch, and if it's easily done without this, then we're done. If not, we can look at it then. -- Darren Hart Intel Open Source Technology Center