From: Parth Shah <parth@linux.ibm.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Patrick Bellasi <patrick.bellasi@matbug.net>,
Valentin Schneider <valentin.schneider@arm.com>,
Pavel Machek <pavel@ucw.cz>, Doug Smythies <dsmythies@telus.net>,
Quentin Perret <qperret@qperret.net>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [RFC v5 4/6] sched/fair: Tune task wake-up logic to pack small background tasks on fewer cores
Date: Wed, 9 Oct 2019 14:27:14 +0530 [thread overview]
Message-ID: <86dc25e4-9f19-627f-9581-d74608b7f20c@linux.ibm.com> (raw)
In-Reply-To: <d55c593d-af8e-c8ba-cc0e-c9917df5d593@arm.com>
On 10/8/19 10:22 PM, Dietmar Eggemann wrote:
> [- Quentin Perret <quentin.perret@arm.com>]
> [+ Quentin Perret <qperret@qperret.net>]
>
> See commit c193a3ffc282 ("mailmap: Update email address for Quentin Perret")
>
noted. thanks for notifying me.
> On 07/10/2019 18:53, Parth Shah wrote:
>>
>>
>> On 10/7/19 5:49 PM, Vincent Guittot wrote:
>>> On Mon, 7 Oct 2019 at 10:31, Parth Shah <parth@linux.ibm.com> wrote:
>>>>
>>>> The algorithm finds the first non idle core in the system and tries to
>>>> place a task in the idle CPU in the chosen core. To maintain
>>>> cache hotness, work of finding non idle core starts from the prev_cpu,
>>>> which also reduces task ping-pong behaviour inside of the core.
>>>>
>>>> Define a new method to select_non_idle_core which keep tracks of the idle
>>>> and non-idle CPUs in the core and based on the heuristics determines if the
>>>> core is sufficiently busy to place the incoming backgroung task. The
>>>> heuristic further defines the non-idle CPU into either busy (>12.5% util)
>>>> CPU and overutilized (>80% util) CPU.
>>>> - The core containing more idle CPUs and no busy CPUs is not selected for
>>>> packing
>>>> - The core if contains more than 1 overutilized CPUs are exempted from
>>>> task packing
>>>> - Pack if there is atleast one busy CPU and overutilized CPUs count is <2
>>>>
>>>> Value of 12.5% utilization for busy CPU gives sufficient heuristics for CPU
>>>> doing enough work an
>
> [...]
>
>>>> @@ -6483,7 +6572,11 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
>>>> } else if (sd_flag & SD_BALANCE_WAKE) { /* XXX always ? */
>>>> /* Fast path */
>>>>
>>>> - new_cpu = select_idle_sibling(p, prev_cpu, new_cpu);
>>>> + if (is_turbosched_enabled() && unlikely(is_background_task(p)))
>>>> + new_cpu = turbosched_select_non_idle_core(p, prev_cpu,
>>>> + new_cpu);
>>>
>>> Could you add turbosched_select_non_idle_core() similarly to
>>> find_energy_efficient_cpu() ?
>>> Add it at the beg select_task_rq_fair()
>>> Return immediately with theCPU if you have found one
>>> Or let the normal path select a CPU if the
>>> turbosched_select_non_idle_core() has not been able to find a suitable
>>> CPU for packing
>>>
>>
>> of course. I can do that.
>> I was just not aware about the effect of wake_affine and so was waiting for
>> such comments to be sure of. Thanks for this.
>> Maybe I can add just below the sched_energy_present(){...} construct giving
>> precedence to EAS? I'm asking this because I remember Patrick telling me to
>> leverage task packing for android as well?
>
> I have a hard time imaging that Turbosched will be used in Android next
> to EAS in the foreseeable future.
>
> First of all, EAS provides task packing already on Performance Domain
> (PD) level (a.k.a. as cluster on traditional 2-cluster Arm/Arm64
> big.LITTLE or DynamIQ (with Phantom domains (out of tree solution)).
> This is where we can safe energy without harming latency.
>
> See the tests results under '2.1 Energy test case' in
>
> https://lore.kernel.org/r/20181203095628.11858-1-quentin.perret@arm.com
>
> There are 10 to 50 small (classified solely by task utilization) tasks
> per test case and EAS shows an effect on energy consumption by packing
> them onto the PD (cluster) of the small CPUs.
>
> And second, the CPU supported topology is different to the one you're
> testing on.
>
cool. I was just keeping in mind the following quote
" defining a generic spread-vs-pack wakeup policy which is something
Android also could benefit from " (https://lkml.org/lkml/2019/6/28/628)
BTW, IIUC that does task consolidation only on single CPU unless
rd->overload is set, right?
> [...]
>
next prev parent reply other threads:[~2019-10-09 8:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 8:30 [RFC v5 0/6] TurboSched: A scheduler for sustaining Turbo Frequencies for longer durations Parth Shah
2019-10-07 8:30 ` [RFC v5 1/6] sched/core: Add manual background task classification using sched_setattr syscall Parth Shah
2019-10-07 8:30 ` [RFC v5 2/6] sched: Introduce switch to enable TurboSched for task packing Parth Shah
2019-10-07 8:30 ` [RFC v5 3/6] sched/core: Update turbo_sched count only when required Parth Shah
2019-10-07 8:30 ` [RFC v5 4/6] sched/fair: Tune task wake-up logic to pack small background tasks on fewer cores Parth Shah
2019-10-07 12:19 ` Vincent Guittot
2019-10-07 16:53 ` Parth Shah
2019-10-08 16:20 ` Vincent Guittot
2019-10-09 8:46 ` Parth Shah
2019-10-08 16:52 ` Dietmar Eggemann
2019-10-09 8:57 ` Parth Shah [this message]
2019-10-09 14:26 ` Dietmar Eggemann
2019-10-09 17:02 ` Parth Shah
2019-10-10 14:53 ` Dietmar Eggemann
2019-10-07 8:30 ` [RFC v5 5/6] sched/fair: Provide arch hook to find domain for non idle core search scan Parth Shah
2019-10-07 8:30 ` [RFC v5 6/6] powerpc: Set turbo domain to NUMA node for task packing Parth Shah
[not found] ` <20191008132842.6612-1-hdanton@sina.com>
2019-10-09 9:22 ` [RFC v5 4/6] sched/fair: Tune task wake-up logic to pack small background tasks on fewer cores Parth Shah
2019-10-09 11:34 ` Vincent Guittot
2019-10-09 16:55 ` Parth Shah
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=86dc25e4-9f19-627f-9581-d74608b7f20c@linux.ibm.com \
--to=parth@linux.ibm.com \
--cc=daniel.lezcano@linaro.org \
--cc=dietmar.eggemann@arm.com \
--cc=dsmythies@telus.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patrick.bellasi@matbug.net \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=qperret@qperret.net \
--cc=rafael.j.wysocki@intel.com \
--cc=tim.c.chen@linux.intel.com \
--cc=valentin.schneider@arm.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
all inboxes | Powered by JetHome®