Re: [PATCH 2/6] sched: Introduce task_is_running()

From: Davidlohr Bueso
Date: Wed Jun 02 2021 - 19:16:07 EST


On Wed, 02 Jun 2021, Peter Zijlstra wrote:

Replace a bunch of 'p->state == TASK_RUNNING' with a new helper:
task_is_running(p).

Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

Acked-by: Davidlohr Bueso

But afaict ....

---
arch/x86/kernel/process.c | 4 ++--
block/blk-mq.c | 2 +-
include/linux/sched.h | 2 ++
kernel/locking/lockdep.c | 2 +-
kernel/rcu/tree_plugin.h | 2 +-
kernel/sched/core.c | 6 +++---
kernel/sched/stats.h | 2 +-
kernel/signal.c | 2 +-
kernel/softirq.c | 3 +--
mm/compaction.c | 2 +-
10 files changed, 14 insertions(+), 13 deletions(-)

there are also (on top of the already mentioned arch/):

kernel/kcsan/report.c: const bool is_running = current->state == TASK_RUNNING;
kernel/locking/lockdep.c: if (p->state == TASK_RUNNING && p != current)