Skip to content

Commit 739f70b

Browse files
Peter Zijlstrasuryasaimadhu
authored andcommitted
sched/core: s/WF_ON_RQ/WQ_ON_CPU/
Use a better name for this poorly named flag, to avoid confusion... Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Mel Gorman <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent b6e13e8 commit 739f70b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

kernel/sched/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,7 @@ static inline bool ttwu_queue_cond(int cpu, int wake_flags)
23762376
* the soon-to-be-idle CPU as the current CPU is likely busy.
23772377
* nr_running is checked to avoid unnecessary task stacking.
23782378
*/
2379-
if ((wake_flags & WF_ON_RQ) && cpu_rq(cpu)->nr_running <= 1)
2379+
if ((wake_flags & WF_ON_CPU) && cpu_rq(cpu)->nr_running <= 1)
23802380
return true;
23812381

23822382
return false;
@@ -2636,7 +2636,7 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
26362636
* scheduling.
26372637
*/
26382638
if (smp_load_acquire(&p->on_cpu) &&
2639-
ttwu_queue_wakelist(p, task_cpu(p), wake_flags | WF_ON_RQ))
2639+
ttwu_queue_wakelist(p, task_cpu(p), wake_flags | WF_ON_CPU))
26402640
goto unlock;
26412641

26422642
/*

kernel/sched/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,7 @@ static inline int task_on_rq_migrating(struct task_struct *p)
16821682
#define WF_SYNC 0x01 /* Waker goes to sleep after wakeup */
16831683
#define WF_FORK 0x02 /* Child wakeup after fork */
16841684
#define WF_MIGRATED 0x04 /* Internal use, task got migrated */
1685-
#define WF_ON_RQ 0x08 /* Wakee is on_rq */
1685+
#define WF_ON_CPU 0x08 /* Wakee is on_cpu */
16861686

16871687
/*
16881688
* To aid in avoiding the subversion of "niceness" due to uneven distribution

0 commit comments

Comments
 (0)