]> asedeno.scripts.mit.edu Git - linux.git/commit
futexes: Fix futex_hashsize initialization
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 16 Jan 2014 13:54:50 +0000 (14:54 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 16 Jan 2014 14:14:32 +0000 (15:14 +0100)
commit63b1a81699c2a45c9f737419b1ec1da0ecf92812
tree10ff7584b7ccb999553e834f9f07b1bd8b84b5e2
parentf549ed1abc7e4f0292ce08c4143c64a610c8b2cb
futexes: Fix futex_hashsize initialization

"futexes: Increase hash table size for better performance"
introduces a new alloc_large_system_hash() call.

alloc_large_system_hash() however may allocate less memory than
requested, e.g. limited by MAX_ORDER.

Hence pass a pointer to alloc_large_system_hash() which will
contain the hash shift when the function returns. Afterwards
correctly set futex_hashsize.

Fixes a crash on s390 where the requested allocation size was
4MB but only 1MB was allocated.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Waiman Long <Waiman.Long@hp.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Link: http://lkml.kernel.org/r/20140116135450.GA4345@osiris
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/futex.c