From: Josh Don Date: Tue, 4 Aug 2020 19:34:13 +0000 (-0700) Subject: sched/fair: Ignore cache hotness for SMT migration X-Git-Tag: v5.10-rc1~203^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec73240b1627cddfd7cef018c7fa1c32e64a721e;p=thirdparty%2Fkernel%2Flinux.git sched/fair: Ignore cache hotness for SMT migration SMT siblings share caches, so cache hotness should be irrelevant for cross-sibling migration. Signed-off-by: Josh Don Proposed-by: Venkatesh Pallipadi Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200804193413.510651-1-joshdon@google.com --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 1a68a0536adda..abdb54e2339f4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7402,6 +7402,10 @@ static int task_hot(struct task_struct *p, struct lb_env *env) if (unlikely(task_has_idle_policy(p))) return 0; + /* SMT siblings share cache */ + if (env->sd->flags & SD_SHARE_CPUCAPACITY) + return 0; + /* * Buddy candidates are cache hot: */