mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] sched: sched_domain fix highest_flag_domain function
@ 2020-10-27  3:32 Xuewen Yan
  2020-10-27  9:57 ` Dietmar Eggemann
  0 siblings, 1 reply; 3+ messages in thread
From: Xuewen Yan @ 2020-10-27  3:32 UTC (permalink / raw)
  To: xuewen.yan, mingo, peterz, juri.lelli, vincent.guittot
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, linux-kernel, Xuewen Yan

the highest_flag_domain is to search the highest sched_domain
containing flag, but if the lower sched_domain didn't contain
the flag, but the higher sched_domain contains the flag, the
function will return NULL instead of the higher sched_domain.

For example:
In MC domain : no SD_ASYM_CPUCAPACITY flag;
In DIE domain : containing SD_ASYM_CPUCAPACITY flag;
the "highest_flag_domain(cpu, SD_ASYM_CPUCAPACITY)" will return NULL.

Signed-off-by: Xuewen Yan <xuewen.yan94@gmail.com>
---
 kernel/sched/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 28709f6..2c7c566 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1427,7 +1427,7 @@ static inline struct sched_domain *highest_flag_domain(int cpu, int flag)
 
 	for_each_domain(cpu, sd) {
 		if (!(sd->flags & flag))
-			break;
+			continue;
 		hsd = sd;
 	}
 
-- 
1.9.1


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

end of thread, other threads:[~2020-10-27 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27  3:32 [PATCH v2] sched: sched_domain fix highest_flag_domain function Xuewen Yan
2020-10-27  9:57 ` Dietmar Eggemann
2020-10-27 10:47   ` Valentin Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®