]> git.baikalelectronics.ru Git - kernel.git/commit
futex: Avoid redundant task lookup
authorThomas Gleixner <tglx@linutronix.de>
Thu, 2 Sep 2021 09:48:51 +0000 (11:48 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 2 Sep 2021 20:07:18 +0000 (22:07 +0200)
commitecd1542893f56b78c0427a4c9d9e1b496ac4da1c
treef48c73dadbf0cb325a58423fd41adb8f6a3157b5
parent2e09ac08dbae88da884c9170b18589ddadf6efb7
futex: Avoid redundant task lookup

No need to do the full VPID based task lookup and validation of the top
waiter when the user space futex was acquired on it's behalf during the
requeue_pi operation. The task is known already and it cannot go away
before requeue_pi_wake_futex() has been invoked.

Split out the actual attach code from attach_pi_state_owner() and use that
instead of the full blown variant.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210902094414.676104881@linutronix.de
kernel/futex.c