sched: Improve try_invoke_on_locked_down_task()
authorPeter Zijlstra <peterz@infradead.org>
Wed, 22 Sep 2021 08:14:15 +0000 (10:14 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 7 Oct 2021 11:51:15 +0000 (13:51 +0200)
commitf6ac18fafcf6cc5e41c26766d12ad335ed81012e
tree96579fe0d912dab753b914131e9a21b5c0b03c28
parent769fdf83df57b373660343ef4270b3ada91ef434
sched: Improve try_invoke_on_locked_down_task()

Clarify and tighten try_invoke_on_locked_down_task().

Basically the function calls @func under task_rq_lock(), except it
avoids taking rq->lock when possible.

This makes calling @func unconditional (the function will get renamed
in a later patch to remove the try).

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Tested-by: Vasily Gorbik <gor@linux.ibm.com> # on s390
Link: https://lkml.kernel.org/r/20210929152428.589323576@infradead.org
kernel/sched/core.c