linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rohit Jain <rohit.k.jain@oracle.com>
To: Joel Fernandes <joelaf@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	steven.sistare@oracle.com, dhaval.giani@oracle.com,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	"Cc: EAS Dev" <eas-dev@lists.linaro.org>
Subject: Re: [RESEND PATCH] sched/fair: consider RT/IRQ pressure in select_idle_sibling
Date: Tue, 6 Feb 2018 09:36:19 -0800	[thread overview]
Message-ID: <39c72c93-b00b-f59c-ad75-af43daac77e9@oracle.com> (raw)
In-Reply-To: <CAJWu+orKkgYMjTxRiaHbjGAxeWT1YZQvpDR7ofpWcJreCi9Zgw@mail.gmail.com>



On 02/05/2018 10:42 PM, Joel Fernandes wrote:
> On Tue, Jan 30, 2018 at 11:47 AM, Rohit Jain <rohit.k.jain@oracle.com> wrote:
> [...]
>>>> @@ -6102,7 +6107,8 @@ static int select_idle_core(struct task_struct *p,
>>>> struct sched_domain *sd, int
>>>>     */
>>>>    static int select_idle_smt(struct task_struct *p, struct sched_domain
>>>> *sd, int target)
>>>>    {
>>>> -       int cpu;
>>>> +       int cpu, rcpu = -1;
>>>> +       unsigned long max_cap = 0;
>>>>
>>>>           if (!static_branch_likely(&sched_smt_present))
>>>>                   return -1;
>>>> @@ -6110,11 +6116,13 @@ static int select_idle_smt(struct task_struct *p,
>>>> struct sched_domain *sd, int t
>>>>           for_each_cpu(cpu, cpu_smt_mask(target)) {
>>>>                   if (!cpumask_test_cpu(cpu, &p->cpus_allowed))
>>>>                           continue;
>>>> -               if (idle_cpu(cpu))
>>>> -                       return cpu;
>>>> +               if (idle_cpu(cpu) && (capacity_of(cpu) > max_cap)) {
>>>> +                       max_cap = capacity_of(cpu);
>>>> +                       rcpu = cpu;
>>> At the SMT level, do you need to bother with choosing best capacity
>>> among threads? If RT is eating into one of the SMT thread's underlying
>>> capacity, it would eat into the other's. Wondering what's the benefit
>>> of doing this here.
>>
>> Yes, you are right because of SD_SHARE_CPUCAPACITY, however the benefit
>> is that if don't do this check, we might end up picking a SMT thread
>> which has "high" RT/IRQ activity and be on the run queue for a while,
>> till the pull side can bail us out.
> Do your tests show a difference in results though with such change
> (for select_idle_smt)?

I don't have the numbers readily available, but I did see a measurable
difference with the select_idle_smt changes.

Thanks,
Rohit

>
> thanks,
>
> - Joel

  reply	other threads:[~2018-02-06 17:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 23:27 [RESEND PATCH] sched/fair: consider RT/IRQ pressure in select_idle_sibling Rohit Jain
2018-01-30  3:39 ` Joel Fernandes
2018-01-30 19:47   ` Rohit Jain
2018-01-31  1:57     ` Joel Fernandes
2018-01-31 17:50       ` Rohit Jain
2018-02-06  6:50         ` Joel Fernandes
2018-02-06  6:51           ` Joel Fernandes
2018-02-06 17:41           ` Rohit Jain
2018-02-09 12:37           ` Peter Zijlstra
2018-02-06  6:42     ` Joel Fernandes
2018-02-06 17:36       ` Rohit Jain [this message]
2018-02-09 12:35   ` Peter Zijlstra
2018-02-09 12:53 ` Peter Zijlstra
2018-02-09 15:46   ` Dietmar Eggemann
2018-02-09 22:05     ` Rohit Jain
2018-02-14  9:11       ` Dietmar Eggemann
2018-02-09 22:17   ` Rohit Jain
2018-03-10 20:41   ` Rohit Jain

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=39c72c93-b00b-f59c-ad75-af43daac77e9@oracle.com \
    --to=rohit.k.jain@oracle.com \
    --cc=dhaval.giani@oracle.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=eas-dev@lists.linaro.org \
    --cc=joelaf@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=steven.sistare@oracle.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;
as well as URLs for NNTP newsgroup(s).