|
@@ -255,9 +255,18 @@ struct futex_hash_bucket {
|
|
|
struct plist_head chain;
|
|
|
} ____cacheline_aligned_in_smp;
|
|
|
|
|
|
-static unsigned long __read_mostly futex_hashsize;
|
|
|
+/*
|
|
|
+ * The base of the bucket array and its size are always used together
|
|
|
+ * (after initialization only in hash_futex()), so ensure that they
|
|
|
+ * reside in the same cacheline.
|
|
|
+ */
|
|
|
+static struct {
|
|
|
+ struct futex_hash_bucket *queues;
|
|
|
+ unsigned long hashsize;
|
|
|
+} __futex_data __read_mostly __aligned(2*sizeof(long));
|
|
|
+#define futex_queues (__futex_data.queues)
|
|
|
+#define futex_hashsize (__futex_data.hashsize)
|
|
|
|
|
|
-static struct futex_hash_bucket *futex_queues;
|
|
|
|
|
|
/*
|
|
|
* Fault injections for futexes.
|