From: Valentin Schneider <valentin.schneider@arm.com>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Josh Don <joshdon@google.com>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched/fair: ignore cache hotness for SMT migration
Date: Mon, 10 Aug 2020 09:55:31 +0100 [thread overview]
Message-ID: <jhjzh72hocc.mognet@arm.com> (raw)
In-Reply-To: <20200810061406.GA15559@linux.vnet.ibm.com>
On 10/08/20 07:14, Srikar Dronamraju wrote:
> * Josh Don <joshdon@google.com> [2020-08-04 12:34:13]:
>
>> SMT siblings share caches, so cache hotness should be irrelevant for
>> cross-sibling migration.
>>
>> Proposed-by: Venkatesh Pallipadi <venki@google.com>
>> Signed-off-by: Josh Don <joshdon@google.com>
>> ---
>> kernel/sched/fair.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 1a68a0536add..abdb54e2339f 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;
>> +
>
> If this for retaining cache hotness, should we look at
> SD_SHARE_PKG_RESOURCES instead of SD_SHARE_CPUCAPACITY?
>
Josh's patch only targets migrating tasks between threads of the same
core - as he points out, cache hotness shouldn't matter here.
Using SD_SHARE_PKG_RESOURCES here would mean freely migrating tasks between
any CPU of an LLC domain, which is quite likely something you do *not* want
to do.
>> /*
>> * Buddy candidates are cache hot:
>> */
>> --
>> 2.28.0.163.g6104cc2f0b6-goog
>>
next prev parent reply other threads:[~2020-08-10 8:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 0:06 [PATCH] sched/fair: ignore cache hotness for SMT migration Josh Don
2020-08-04 10:56 ` peterz
2020-08-04 19:24 ` Josh Don
2020-08-04 19:34 ` [PATCH v2] " Josh Don
2020-08-10 6:14 ` Srikar Dronamraju
2020-08-10 8:55 ` Valentin Schneider [this message]
2020-08-27 7:54 ` [tip: sched/core] sched/fair: Ignore " tip-bot2 for Josh Don
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jhjzh72hocc.mognet@arm.com \
--to=valentin.schneider@arm.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox