From: alex.shi@intel.com (Alex Shi)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v3 5/6] sched: pack the idle load balance
Date: Wed, 27 Mar 2013 16:47:17 +0800 [thread overview]
Message-ID: <5152B215.2040808@intel.com> (raw)
In-Reply-To: <CAKfTPtDK6vSDhGa9=ReaHt_oO8Xz2agZZ4x3q5Wvv6gXjhFevg@mail.gmail.com>
>>>>> So supposing the current ILB is 6, we'll only check 4, not 0-3, even
>>>>> though there might be a perfectly idle cpu in there.
>>> We will check 4,5,7 at MC level in order to pack in the group of A15
>>> (because they are not sharing the same power domain). If none of them
>>> are idle, we will look at CPU level and will check CPUs 0-3.
>>
>> So you increase a fixed step here.
>
> I have modified the find_new_ilb function to look for the best idle
> CPU instead of just picking the first CPU of idle_cpus_mask.
That's better.
But using a fixed buddy is still not flexible, and involve more checking
in this time critical balancing.
Consider the most of SMP system, cpu is equal, so any of other cpu can
play the role of buddy in your design. That means no buddy cpu is
better, like my version packing.
>
>>>
>>>>>
>>>>> Also, your scheme fails to pack when cpus 0,4 are filled, even when
>>>>> there's idle cores around.
>>> The primary target is to pack the tasks only when we are in a not busy
>>> system so you will have a power improvement without performance
>>> decrease. is_light_task function returns false and is_buddy_busy
>>> function true before the buddy is fully loaded and the scheduler will
>>> fall back into the default behavior which spreads tasks and races to
>>> idle.
>>>
>>> We can extend the buddy CPU and the packing mechanism to fill one CPU
>>> before filling another buddy but it's not always the best choice for
>>> performance and/or power and thus it will imply to have a knob to
>>> select this full packing mode.
>>
>> Just one buddy to pack tasks for whole level cpus definitely has
>> scalability problem. That is not good for powersaving in most of scenarios.
>>
>
> This patch doesn't want to pack all kind of tasks in all scenario but
> only the small tasks that run less that 10ms and when the CPU is not
> already too busy with other tasks so you don't have to cope with long
> wake up latency and performance regression and only one CPU will be
> powered up for these background activities. Nevertheless, I can extend
> the packing small tasks to pack all tasks in any scenario in as few
> CPUs as possible. This will imply to choose a new buddy CPU when the
> previous one is full during the ILB selection as an example and to add
> a knob to select this mode which will modify the performance of the
> system. But the primary target is not to have a knob and not to reduce
> performance in most of scenario.
Arguing the performance/power balance does no much sense without
detailed scenario. We just want to seek a flexible compromise way.
But fixed buddy cpu is not flexible. and it may lose many possible
powersaving fit scenarios on x86 system. Like if 2 SMT cpu can handle
all tasks, we don't need to wake another core. or if 2 cores in one
socket can handle tasks, we also don't need to wakeup another socket.
>
> Regards,
> Vincent
>
>>
>> --
>> Thanks Alex
--
Thanks Alex
next prev parent reply other threads:[~2013-03-27 8:47 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 12:25 [RFC PATCH v3 0/6] sched: packing small tasks Vincent Guittot
2013-03-22 12:25 ` [RFC PATCH v3 1/6] Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking" Vincent Guittot
2013-03-22 12:25 ` [RFC PATCH v3 2/6] sched: add a new SD_SHARE_POWERDOMAIN flag for sched_domain Vincent Guittot
2013-03-22 12:25 ` [RFC PATCH v3 3/6] sched: pack small tasks Vincent Guittot
2013-03-26 12:26 ` Peter Zijlstra
2013-03-27 10:21 ` Preeti U Murthy
2013-03-27 11:00 ` Vincent Guittot
2013-04-26 10:30 ` Peter Zijlstra
2013-04-26 11:34 ` Vincent Guittot
2013-04-26 10:18 ` Peter Zijlstra
2013-04-26 10:32 ` Preeti U Murthy
2013-03-26 12:37 ` Peter Zijlstra
2013-03-26 13:00 ` Vincent Guittot
2013-03-27 4:33 ` Preeti U Murthy
2013-03-27 4:48 ` Alex Shi
2013-03-27 8:51 ` Peter Zijlstra
2013-03-26 12:46 ` Peter Zijlstra
2013-03-26 13:53 ` Vincent Guittot
2013-03-26 15:29 ` Arjan van de Ven
2013-03-27 8:46 ` Peter Zijlstra
2013-03-27 8:54 ` Vincent Guittot
2013-03-27 9:00 ` Peter Zijlstra
2013-03-27 11:18 ` Catalin Marinas
2013-03-27 14:13 ` Peter Zijlstra
2013-03-27 16:36 ` Catalin Marinas
2013-03-27 17:18 ` Nicolas Pitre
2013-03-27 17:37 ` Catalin Marinas
2013-03-27 17:20 ` Vincent Guittot
2013-03-27 18:01 ` Catalin Marinas
2013-03-27 15:37 ` Nicolas Pitre
2013-03-22 12:25 ` [RFC PATCH v3 4/6] sched: secure access to other CPU statistics Vincent Guittot
2013-03-26 12:50 ` Peter Zijlstra
2013-03-26 13:06 ` Vincent Guittot
2013-03-22 12:25 ` [RFC PATCH v3 5/6] sched: pack the idle load balance Vincent Guittot
2013-03-26 12:52 ` Peter Zijlstra
2013-03-26 14:03 ` Vincent Guittot
2013-03-26 14:42 ` Peter Zijlstra
2013-03-26 15:55 ` Vincent Guittot
2013-03-27 4:56 ` Alex Shi
2013-03-27 8:05 ` Vincent Guittot
2013-03-27 8:47 ` Alex Shi [this message]
2013-03-27 10:30 ` Vincent Guittot
2013-03-27 13:32 ` Alex Shi
2013-03-27 8:49 ` Peter Zijlstra
2013-04-05 11:08 ` Vincent Guittot
2013-04-22 5:45 ` Preeti U Murthy
[not found] ` <CAKfTPtCCCifC=c+xjjnAH_HSqkR80PiQoddQKXPHuZwZawbvcA@mail.gmail.com>
2013-04-23 2:23 ` Alex Shi
2013-04-23 4:57 ` Preeti U Murthy
2013-04-23 15:30 ` Arjan van de Ven
2013-04-26 10:54 ` Peter Zijlstra
2013-04-23 4:36 ` Preeti U Murthy
2013-03-22 12:25 ` [RFC PATCH v3 6/6] ARM: sched: clear SD_SHARE_POWERDOMAIN Vincent Guittot
2013-03-23 11:55 ` [RFC PATCH v3 0/6] sched: packing small tasks Preeti U Murthy
2013-03-25 9:58 ` Vincent Guittot
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=5152B215.2040808@intel.com \
--to=alex.shi@intel.com \
--cc=linux-arm-kernel@lists.infradead.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).