Skip to content

Commit 522fb20

Browse files
author
Peter Zijlstra
committed
sched/fair: Have SD_SERIALIZE affect newidle balancing
Also serialize the possiblty much more frequent newidle balancing for the 'expensive' domains that have SD_BALANCE set. Initial benchmarking by K Prateek and Tim showed no negative effect. Split out from the larger patch moving sched_balance_running around for ease of bisect and such. Suggested-by: Shrikanth Hegde <sshegde@linux.ibm.com> Seconded-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/df068896-82f9-458d-8fff-5a2f654e8ffd@amd.com Link: https://patch.msgid.link/6fed119b723c71552943bfe5798c93851b30a361.1762800251.git.tim.c.chen@linux.intel.com # Conflicts: # kernel/sched/fair.c
1 parent 3324b21 commit 522fb20

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/sched/fair.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11732,7 +11732,7 @@ static int sched_balance_rq(int this_cpu, struct rq *this_rq,
1173211732
goto out_balanced;
1173311733
}
1173411734

11735-
if (!need_unlock && (sd->flags & SD_SERIALIZE) && idle != CPU_NEWLY_IDLE) {
11735+
if (!need_unlock && (sd->flags & SD_SERIALIZE)) {
1173611736
int zero = 0;
1173711737
if (!atomic_try_cmpxchg_acquire(&sched_balance_running, &zero, 1))
1173811738
goto out_balanced;

0 commit comments

Comments
 (0)