diff options
author | Thomas Gleixner <[email protected]> | 2021-08-15 23:29:09 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2021-08-17 19:05:44 +0200 |
commit | 8e74633dcefb280f2cefb49b7201d99650243d96 (patch) | |
tree | 27270a917e3de9a3cb45865d5dde7652af35619e | |
parent | f6f4ec00b57a2c950235435bff8e888daafad5af (diff) |
futex: Remove bogus condition for requeue PI
For requeue PI it's required to establish PI state for the PI futex to
which waiters are requeued. This either acquires the user space futex on
behalf of the top most waiter on the inner 'waitqueue' futex, or attaches to
the PI state of an existing waiter, or creates on attached to the owner of
the futex.
This code can retry in case of failure, but retry can never happen when the
pi state was successfully created. The condition to run this code is:
(task_count - nr_wake) < nr_requeue
which is always true because:
task_count = 0
nr_wake = 1
nr_requeue >= 0
Remove it completely.
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | kernel/futex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index c39d5f17946b..8ddc87cae25c 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2000,7 +2000,7 @@ retry_private: } } - if (requeue_pi && (task_count - nr_wake < nr_requeue)) { + if (requeue_pi) { struct task_struct *exiting = NULL; /* |