linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] sched/fair: Cleanup load_balance() condition
@ 2018-09-26 15:12 Valentin Schneider
  2018-09-26 15:12 ` [PATCH v2 2/2] sched/fair: Don't increase sd->balance_interval on newidle balance Valentin Schneider
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Valentin Schneider @ 2018-09-26 15:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, peterz, vincent.guittot, Dietmar.Eggemann, patrick.bellasi

The alignment of the condition is off, clean that up.

Also, logical operators have lower precedence than bitwise/relational
operators, so remove one layer of parentheses to make the condition a
bit simpler to follow.

Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
 kernel/sched/fair.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6bd142d..9cf93ba 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8783,9 +8783,9 @@ static int load_balance(int this_cpu, struct rq *this_rq,
 
 out_one_pinned:
 	/* tune up the balancing interval */
-	if (((env.flags & LBF_ALL_PINNED) &&
-			sd->balance_interval < MAX_PINNED_INTERVAL) ||
-			(sd->balance_interval < sd->max_interval))
+	if ((env.flags & LBF_ALL_PINNED &&
+	     sd->balance_interval < MAX_PINNED_INTERVAL) ||
+	    sd->balance_interval < sd->max_interval)
 		sd->balance_interval *= 2;
 
 	ld_moved = 0;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-04  0:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 15:12 [PATCH v2 1/2] sched/fair: Cleanup load_balance() condition Valentin Schneider
2018-09-26 15:12 ` [PATCH v2 2/2] sched/fair: Don't increase sd->balance_interval on newidle balance Valentin Schneider
2018-11-04  0:13   ` [tip:sched/core] " tip-bot for Valentin Schneider
2018-10-30 10:27 ` [PATCH v2 1/2] sched/fair: Cleanup load_balance() condition Valentin Schneider
2018-10-30 12:41   ` Peter Zijlstra
2018-11-04  0:13 ` [tip:sched/core] sched/fair: Clean up " tip-bot for Valentin Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).