projects/linux·commit b3fc5c9b

sched/wait: Improve __var_waitqueue() code generation

b3fc5c9b · Peter Zijlstra <[email protected]> · 2018-03-15 11:49:36 +01:00

Since we fixed hash_64() to not suck there is no need to play games to
attempt to improve the hash value on 64-bit.

Also, since we don't use the bit value for the variables, use hash_ptr()
directly.

No change in functionality.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: George Spelvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Commit
b3fc5c9bb373661224906bf434c09ca0de032e82
Parents
9b8cce52

Changes

1 files changed · +1 −6

FileStatusAddDelContent
kernel/sched/wait_bit.cmodified+1−6View file

kernel/sched/wait_bit.c

View file
diff --git a/kernel/sched/wait_bit.c b/kernel/sched/wait_bit.c
index 60a84f5..c67c6d2 100644
--- a/kernel/sched/wait_bit.c
+++ b/kernel/sched/wait_bit.c
@@ -151,12 +151,7 @@ EXPORT_SYMBOL(wake_up_bit);
wait_queue_head_t *__var_waitqueue(void *p)
{
- if (BITS_PER_LONG == 64) {
- unsigned long q = (unsigned long)p;
-
- return bit_waitqueue((void *)(q & ~1), q & 1);
- }
- return bit_waitqueue(p, 0);
+ return bit_wait_table + hash_ptr(p, WAIT_TABLE_BITS);
}
EXPORT_SYMBOL(__var_waitqueue);