From: Vincent Guittot <vincent.guittot@linaro.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Alex Shi <alex.shi@linaro.org>,
Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [RFC PATCHC 0/3] sched/idle : find the idlest cpu with cpuidle info
Date: Mon, 31 Mar 2014 15:52:21 +0200 [thread overview]
Message-ID: <CAKfTPtC4E=7DxnXZy8bSpeAqyLwsr-oXodXBod2aMc_x4VyqGg@mail.gmail.com> (raw)
In-Reply-To: <1396009796-31598-1-git-send-email-daniel.lezcano@linaro.org>
On 28 March 2014 13:29, Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> The following patchset provides an interaction between cpuidle and the scheduler.
>
> The first patch encapsulate the needed information for the scheduler in a
> separate cpuidle structure. The second one stores the pointer to this structure
> when entering idle. The third one, use this information to take the decision to
> find the idlest cpu.
>
> After some basic testing with hackbench, it appears there is an improvement for
> the performances (small) and for the duration of the idle states (which provides
> a better power saving).
>
> The measurement has been done with the 'idlestat' tool previously posted in this
> mailing list.
>
> So the benefit is good for both sides performance and power saving.
Hi Daniel,
I have looked at your results and i'm a bit surprised that you have so
much time in C-state with a test that involved 400 tasks on a dual
cores HT system. You shouldn't have any CPUs in idle state when
running hackbench; the total time of core0state in C7-IVB is
87932131.00(us), which is quite huge for a bench that runs 44sec. Or
i'm doing something wrong in the interpretation of the results ?
Regards,
Vincent
>
> The select_idle_sibling could be also improved in the same way.
>
> ====================== test with hackbench 3.14-rc8 =========================
>
> /usr/bin/hackbench -l 10000 -s 4096
>
> Running in process mode with 10 groups using 40 file descriptors each (== 400 tasks)
> Each sender will pass 10000 messages of 4096 bytes
>
> Time: 44.433
>
> Total trace buffer: 1846688 kB
> clusterA@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-VB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 0 0.00 0.00 0.00 0.00
> core0@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-IVB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 1396 87932131.00 62988.63 0.00 320146.00
> cpu0@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 1 14.00 14.00 14.00 14.00
> C1E-VB 0 0.00 0.00 0.00 0.00
> C3-IVB 1 262.00 262.00 262.00 262.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 1180 87938177.00 74523.88 1.00 320147.00
> 1701 0 0.00 0.00 0.00 0.00
> 1700 0 0.00 0.00 0.00 0.00
> 1600 0 0.00 0.00 0.00 0.00
> 1500 0 0.00 0.00 0.00 0.00
> 1400 0 0.00 0.00 0.00 0.00
> 1300 0 0.00 0.00 0.00 0.00
> 1200 0 0.00 0.00 0.00 0.00
> 1100 0 0.00 0.00 0.00 0.00
> 1000 0 0.00 0.00 0.00 0.00
> 900 0 0.00 0.00 0.00 0.00
> 800 0 0.00 0.00 0.00 0.00
> 782 0 0.00 0.00 0.00 0.00
> cpu0 wakeups name count
> irq009 acpi 1
> cpu1@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-VB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 475 87941356.00 185139.70 322.00 1500690.00
> 1701 0 0.00 0.00 0.00 0.00
> 1700 0 0.00 0.00 0.00 0.00
> 1600 0 0.00 0.00 0.00 0.00
> 1500 0 0.00 0.00 0.00 0.00
> 1400 0 0.00 0.00 0.00 0.00
> 1300 0 0.00 0.00 0.00 0.00
> 1200 0 0.00 0.00 0.00 0.00
> 1100 0 0.00 0.00 0.00 0.00
> 1000 0 0.00 0.00 0.00 0.00
> 900 0 0.00 0.00 0.00 0.00
> 800 0 0.00 0.00 0.00 0.00
> 782 0 0.00 0.00 0.00 0.00
> cpu1 wakeups name count
> irq009 acpi 3
> core1@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-IVB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 0 0.00 0.00 0.00 0.00
> cpu2@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 11 288157.00 26196.09 16.00 200060.00
> C1E-VB 6 221601.00 36933.50 79.00 200066.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 950 87417466.00 92018.39 19.00 200074.00
> 1701 0 0.00 0.00 0.00 0.00
> 1700 0 0.00 0.00 0.00 0.00
> 1600 0 0.00 0.00 0.00 0.00
> 1500 2 34.00 17.00 11.00 23.00
> 1400 0 0.00 0.00 0.00 0.00
> 1300 0 0.00 0.00 0.00 0.00
> 1200 0 0.00 0.00 0.00 0.00
> 1100 0 0.00 0.00 0.00 0.00
> 1000 0 0.00 0.00 0.00 0.00
> 900 0 0.00 0.00 0.00 0.00
> 800 0 0.00 0.00 0.00 0.00
> 782 745 18800.00 25.23 2.00 156.00
> cpu2 wakeups name count
> irq019 ahci 50
> irq009 acpi 17
> cpu3@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-VB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 0 0.00 0.00 0.00 0.00
> 1701 0 0.00 0.00 0.00 0.00
> 1700 0 0.00 0.00 0.00 0.00
> 1600 0 0.00 0.00 0.00 0.00
> 1500 0 0.00 0.00 0.00 0.00
> 1400 0 0.00 0.00 0.00 0.00
> 1300 0 0.00 0.00 0.00 0.00
> 1200 0 0.00 0.00 0.00 0.00
> 1100 0 0.00 0.00 0.00 0.00
> 1000 0 0.00 0.00 0.00 0.00
> 900 0 0.00 0.00 0.00 0.00
> 800 0 0.00 0.00 0.00 0.00
> 782 0 0.00 0.00 0.00 0.00
> cpu3 wakeups name count
>
> ================ test with hackbench 3.14-rc8 + patchset ====================
>
> /usr/bin/hackbench -l 10000 -s 4096
>
> Running in process mode with 10 groups using 40 file descriptors each (== 400 tasks)
> Each sender will pass 10000 messages of 4096 bytes
>
> Time: 42.179
>
> Total trace buffer: 1846688 kB
> clusterA@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-VB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 0 0.00 0.00 0.00 0.00
> core0@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-IVB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 880 89157590.00 101315.44 0.00 400184.00
> cpu0@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-VB 1 233.00 233.00 233.00 233.00
> C3-IVB 1 260.00 260.00 260.00 260.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 700 89162006.00 127374.29 182.00 400187.00
> 1701 0 0.00 0.00 0.00 0.00
> 1700 0 0.00 0.00 0.00 0.00
> 1600 0 0.00 0.00 0.00 0.00
> 1500 0 0.00 0.00 0.00 0.00
> 1400 0 0.00 0.00 0.00 0.00
> 1300 0 0.00 0.00 0.00 0.00
> 1200 0 0.00 0.00 0.00 0.00
> 1100 0 0.00 0.00 0.00 0.00
> 1000 0 0.00 0.00 0.00 0.00
> 900 0 0.00 0.00 0.00 0.00
> 800 0 0.00 0.00 0.00 0.00
> 782 0 0.00 0.00 0.00 0.00
> cpu0 wakeups name count
> irq009 acpi 2
> cpu1@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-VB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 334 89164805.00 266960.49 1.00 1500677.00
> 1701 0 0.00 0.00 0.00 0.00
> 1700 0 0.00 0.00 0.00 0.00
> 1600 0 0.00 0.00 0.00 0.00
> 1500 0 0.00 0.00 0.00 0.00
> 1400 0 0.00 0.00 0.00 0.00
> 1300 0 0.00 0.00 0.00 0.00
> 1200 0 0.00 0.00 0.00 0.00
> 1100 0 0.00 0.00 0.00 0.00
> 1000 0 0.00 0.00 0.00 0.00
> 900 0 0.00 0.00 0.00 0.00
> 800 0 0.00 0.00 0.00 0.00
> 782 0 0.00 0.00 0.00 0.00
> cpu1 wakeups name count
> irq009 acpi 6
> core1@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-IVB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 0 0.00 0.00 0.00 0.00
> cpu2@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 19 2169047.00 114160.37 18.00 999129.00
> C1E-IB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 376 86993307.00 231365.18 20.00 1500682.00
> 1701 0 0.00 0.00 0.00 0.00
> 1700 0 0.00 0.00 0.00 0.00
> 1600 0 0.00 0.00 0.00 0.00
> 1500 0 0.00 0.00 0.00 0.00
> 1400 0 0.00 0.00 0.00 0.00
> 1300 0 0.00 0.00 0.00 0.00
> 1200 0 0.00 0.00 0.00 0.00
> 1100 0 0.00 0.00 0.00 0.00
> 1000 0 0.00 0.00 0.00 0.00
> 900 0 0.00 0.00 0.00 0.00
> 800 0 0.00 0.00 0.00 0.00
> 782 0 0.00 0.00 0.00 0.00
> cpu2 wakeups name count
> irq009 acpi 32
> irq019 ahci 45
> cpu3@state hits total(us) avg(us) min(us) max(us)
> POLL 0 0.00 0.00 0.00 0.00
> C1-IVB 0 0.00 0.00 0.00 0.00
> C1E-VB 0 0.00 0.00 0.00 0.00
> C3-IVB 0 0.00 0.00 0.00 0.00
> C6-IVB 0 0.00 0.00 0.00 0.00
> C7-IVB 0 0.00 0.00 0.00 0.00
> 1701 0 0.00 0.00 0.00 0.00
> 1700 0 0.00 0.00 0.00 0.00
> 1600 0 0.00 0.00 0.00 0.00
> 1500 0 0.00 0.00 0.00 0.00
> 1400 0 0.00 0.00 0.00 0.00
> 1300 0 0.00 0.00 0.00 0.00
> 1200 0 0.00 0.00 0.00 0.00
> 1100 0 0.00 0.00 0.00 0.00
> 1000 0 0.00 0.00 0.00 0.00
> 900 0 0.00 0.00 0.00 0.00
> 800 0 0.00 0.00 0.00 0.00
> 782 0 0.00 0.00 0.00 0.00
> cpu3 wakeups name count
>
>
> Daniel Lezcano (3):
> cpuidle: encapsulate power info in a separate structure
> idle: store the idle state the cpu is
> sched/fair: use the idle state info to choose the idlest cpu
>
> arch/arm/include/asm/cpuidle.h | 6 +-
> arch/arm/mach-exynos/cpuidle.c | 4 +-
> drivers/acpi/processor_idle.c | 4 +-
> drivers/base/power/domain.c | 6 +-
> drivers/cpuidle/cpuidle-at91.c | 4 +-
> drivers/cpuidle/cpuidle-big_little.c | 9 +--
> drivers/cpuidle/cpuidle-calxeda.c | 6 +-
> drivers/cpuidle/cpuidle-kirkwood.c | 4 +-
> drivers/cpuidle/cpuidle-powernv.c | 8 +--
> drivers/cpuidle/cpuidle-pseries.c | 12 ++--
> drivers/cpuidle/cpuidle-ux500.c | 14 ++---
> drivers/cpuidle/cpuidle-zynq.c | 4 +-
> drivers/cpuidle/driver.c | 6 +-
> drivers/cpuidle/governors/ladder.c | 14 +++--
> drivers/cpuidle/governors/menu.c | 8 +--
> drivers/cpuidle/sysfs.c | 2 +-
> drivers/idle/intel_idle.c | 112 +++++++++++++++++-----------------
> include/linux/cpuidle.h | 10 ++-
> kernel/sched/fair.c | 46 ++++++++++++--
> kernel/sched/idle.c | 17 +++++-
> kernel/sched/sched.h | 5 ++
> 21 files changed, 180 insertions(+), 121 deletions(-)
>
> --
> 1.7.9.5
>
next prev parent reply other threads:[~2014-03-31 13:52 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 12:29 [RFC PATCHC 0/3] sched/idle : find the idlest cpu with cpuidle info Daniel Lezcano
2014-03-28 12:29 ` [RFC PATCHC 1/3] cpuidle: encapsulate power info in a separate structure Daniel Lezcano
2014-03-28 18:17 ` Nicolas Pitre
2014-03-28 20:42 ` Daniel Lezcano
2014-03-29 0:00 ` Nicolas Pitre
2014-03-28 12:29 ` [RFC PATCHC 2/3] idle: store the idle state the cpu is Daniel Lezcano
2014-04-15 12:43 ` Peter Zijlstra
2014-04-15 12:44 ` Peter Zijlstra
2014-04-15 14:17 ` Daniel Lezcano
2014-04-15 14:33 ` Peter Zijlstra
2014-04-15 14:39 ` Daniel Lezcano
2014-03-28 12:29 ` [RFC PATCHC 3/3] sched/fair: use the idle state info to choose the idlest cpu Daniel Lezcano
2014-04-02 3:05 ` Nicolas Pitre
2014-04-04 11:57 ` Rafael J. Wysocki
2014-04-04 16:56 ` Nicolas Pitre
2014-04-05 2:01 ` Rafael J. Wysocki
2014-04-17 13:53 ` Daniel Lezcano
2014-04-17 14:47 ` Peter Zijlstra
2014-04-17 15:03 ` Daniel Lezcano
2014-04-18 8:09 ` Ingo Molnar
2014-04-18 8:36 ` Daniel Lezcano
2014-04-17 15:53 ` Nicolas Pitre
2014-04-17 16:05 ` Daniel Lezcano
2014-04-17 16:21 ` Nicolas Pitre
2014-04-18 9:38 ` Peter Zijlstra
2014-04-18 12:13 ` Daniel Lezcano
2014-04-18 12:53 ` Peter Zijlstra
2014-04-18 13:04 ` Daniel Lezcano
2014-04-18 16:00 ` Nicolas Pitre
2014-04-15 13:03 ` Peter Zijlstra
2014-03-31 13:52 ` Vincent Guittot [this message]
2014-03-31 15:55 ` [RFC PATCHC 0/3] sched/idle : find the idlest cpu with cpuidle info Daniel Lezcano
2014-04-01 7:16 ` Vincent Guittot
2014-04-01 7:43 ` Daniel Lezcano
2014-04-01 9:05 ` Vincent Guittot
2014-04-15 13:13 ` Peter Zijlstra
2014-04-01 23:01 ` Rafael J. Wysocki
2014-04-02 3:14 ` Nicolas Pitre
2014-04-04 11:43 ` Rafael J. Wysocki
2014-04-15 13:17 ` Peter Zijlstra
2014-04-15 13:25 ` Peter Zijlstra
2014-04-15 15:27 ` Nicolas Pitre
2014-04-15 15:33 ` Rafael J. Wysocki
2014-04-02 8:26 ` Daniel Lezcano
2014-04-04 11:23 ` Rafael J. Wysocki
2014-04-04 6:29 ` Len Brown
2014-04-04 8:16 ` Daniel Lezcano
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='CAKfTPtC4E=7DxnXZy8bSpeAqyLwsr-oXodXBod2aMc_x4VyqGg@mail.gmail.com' \
--to=vincent.guittot@linaro.org \
--cc=alex.shi@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=morten.rasmussen@arm.com \
--cc=nicolas.pitre@linaro.org \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.