Messages in this thread Patch in this message | | | Date | Fri, 08 Nov 2019 14:15:55 +0100 | From | Peter Zijlstra <> | Subject | [PATCH 2/7] 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.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> --- kernel/sched/fair.c | 5 +++++ 1 file changed, 5 insertions(+)
--- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9920,6 +9920,11 @@ static inline void nohz_newidle_balance( /* * 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) {
| |