Skip to content

Commit

Permalink
sched/core: Change root_domain->overload type to int
Browse files Browse the repository at this point in the history
sizeof(_Bool) is implementation defined, so let's just go with 'int' as
is done for other structures e.g. sched_domain_shared->has_idle_cores.

The local 'overload' variable used in update_sd_lb_stats can remain
bool, as it won't impact any struct layout and can be assigned to the
root_domain field.

Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
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: dietmar.eggemann@arm.com
Cc: gaku.inami.xh@renesas.com
Cc: vincent.guittot@linaro.org
Link: http://lkml.kernel.org/r/1530699470-29808-8-git-send-email-morten.rasmussen@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Valentin Schneider authored and Ingo Molnar committed Sep 10, 2018
1 parent dbbad71 commit 575638d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ struct root_domain {
cpumask_var_t online;

/* Indicate more than one runnable task for any CPU */
bool overload;
int overload;

/*
* The bit corresponding to a CPU gets set here if such CPU has more
Expand Down Expand Up @@ -1698,7 +1698,7 @@ static inline void add_nr_running(struct rq *rq, unsigned count)
if (prev_nr < 2 && rq->nr_running >= 2) {
#ifdef CONFIG_SMP
if (!rq->rd->overload)
rq->rd->overload = true;
rq->rd->overload = 1;
#endif
}

Expand Down

0 comments on commit 575638d

Please sign in to comment.