diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-09-09 23:36:40 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-09-22 16:23:15 +0200 |
commit | ac742d37180bee83bc433be087b66a17af2883b9 (patch) | |
tree | 8607e1aa1dd65d5229c921a62fc97c99319cd7f3 /kernel/user-return-notifier.c | |
parent | 93edc8bd7750ff3cae088bfca453ea73dc9004a4 (diff) | |
download | blackbird-op-linux-ac742d37180bee83bc433be087b66a17af2883b9.tar.gz blackbird-op-linux-ac742d37180bee83bc433be087b66a17af2883b9.zip |
futex: Force hot variables into a single cache line
futex_hash() references two global variables: the base pointer
futex_queues and the size of the array futex_hashsize. The latter is
marked __read_mostly, while the former is not, so they are likely to
end up very far from each other. This means that futex_hash() is
likely to encounter two cache misses.
We could mark futex_queues as __read_mostly as well, but that doesn't
guarantee they'll end up next to each other (and even if they do, they
may still end up in different cache lines). So put the two variables
in a small singleton struct with sufficient alignment and mark that as
__read_mostly.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: kbuild test robot <fengguang.wu@intel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: http://lkml.kernel.org/r/1441834601-13633-1-git-send-email-linux@rasmusvillemoes.dk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/user-return-notifier.c')
0 files changed, 0 insertions, 0 deletions