diff options
author | 2019-11-08 14:15:55 +0100 | |
---|---|---|
committer | 2019-11-11 08:35:18 +0100 | |
commit | 7277a34c6be0b2972bdd1fea88c7cef409bed5b4 (patch) | |
tree | 3676ac4c75f4b842510d8e9855d6bcc043d58ce7 /kernel/sched | |
parent | Merge tag 'v5.4-rc7' into sched/core, to pick up fixes (diff) | |
download | linux-7277a34c6be0b2972bdd1fea88c7cef409bed5b4.tar.gz linux-7277a34c6be0b2972bdd1fea88c7cef409bed5b4.tar.bz2 linux-7277a34c6be0b2972bdd1fea88c7cef409bed5b4.zip |
sched/fair: Better document newidle_balance()
Whilst chasing the pick_next_task() race, there was some confusion
about the newidle_balance() return values. Document them.
[ mingo: Minor edits. ]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bsegall@google.com
Cc: dietmar.eggemann@arm.com
Cc: juri.lelli@redhat.com
Cc: ktkhai@virtuozzo.com
Cc: mgorman@suse.de
Cc: qais.yousef@arm.com
Cc: qperret@google.com
Cc: rostedt@goodmis.org
Cc: valentin.schneider@arm.com
Cc: vincent.guittot@linaro.org
Link: https://lkml.kernel.org/r/20191108131909.488364308@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/fair.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6e622f48c8de..c48a695a140c 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9941,6 +9941,11 @@ static inline void nohz_newidle_balance(struct rq *this_rq) { } /* * idle_balance is called by schedule() if this_cpu is about to become * idle. Attempts to pull tasks from other CPUs. + * + * Returns: + * < 0 - we released the lock and there are !fair tasks present + * 0 - failed, no new tasks + * > 0 - success, new (fair) tasks present */ int newidle_balance(struct rq *this_rq, struct rq_flags *rf) { |