Message ID | 1460280912.4251.27.camel@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Sun, 2016-04-10 at 11:35 +0200, Mike Galbraith wrote: > On Sun, 2016-04-10 at 05:44 +0200, Rafael J. Wysocki wrote: > > On Sat, Apr 9, 2016 at 6:39 PM, Mike Galbraith < > > umgwanakikbuti@gmail.com> wrote: > > > > > > Hm, setting gov=performance, and taking the average of 3 30 second > > > interval PkgWatt samples as pipe-test runs.. > > > > > > 714KHz/28.03Ws = 25.46 > > > 877KHz/30.28Ws = 28.96 > > > > > > ..for pipe-test, the tradeoff look a bit more like red than green. > > > > Well, fair enough, but that's just pipe-test, and what about the > > people who don't see the performance gain and see the energy loss, > > like Doug? > > Perhaps Doug sees increased power because he's not throttling no_hz, > whereas I am, so he burns more power getting _to_ idle? Dunno, maybe > he'll try the attached. If it's a general case energy loser, so be it, > numbers talk, bs walks and all that ;-) And here are the rest of my numbers.. > tbench 1 2 4 8 > base 752 1283 2250 3362 > > select_idle_sibling() off > 735 1344 2080 2884 > delta .977 1.047 .924 .857 > > select_idle_sibling() on, 0c313cb20732 reverted > 816 1317 2240 3388 > delta 1.085 1.026 .995 1.007 vs base > delta 1.110 .979 1.076 1.174 vs off > (^hm) tbench 2 turboboost off base 1215 1.00 1215/32.24=37.68 revert 1252 1.03 1252/35.82=34.95=loser tbench 2 throughput hm is apparently a turboboost oddity, and.. tbench (turboboost back on) power 1 2 4 8 base 23.88 37.41 54.64 62.25 revert 31.25 42.53 55.11 62.66 MB/s/Ws 1 2 4 8 base 31.49 34.29 41.17 54.00 revert 26.11 30.96 40.64 54.06 ..while single pipe-test pair said green/green, tbench numbers say throughput green, but energy efficiency red across the board. -Mike -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
sched: ratelimit nohz Entering nohz code on every micro-idle is too expensive to bear. Signed-off-by: Mike Galbraith <efault@gmx.de> --- include/linux/sched.h | 5 +++++ kernel/sched/core.c | 8 ++++++++ kernel/time/tick-sched.c | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2286,6 +2286,11 @@ static inline int set_cpus_allowed_ptr(s #ifdef CONFIG_NO_HZ_COMMON void calc_load_enter_idle(void); void calc_load_exit_idle(void); +#ifdef CONFIG_SMP +extern int sched_needs_cpu(int cpu); +#else +static inline int sched_needs_cpu(int cpu) { return 0; } +#endif #else static inline void calc_load_enter_idle(void) { } static inline void calc_load_exit_idle(void) { } --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -577,6 +577,14 @@ static inline bool got_nohz_idle_kick(vo return false; } +int sched_needs_cpu(int cpu) +{ + if (tick_nohz_full_cpu(cpu)) + return 0; + + return cpu_rq(cpu)->avg_idle < sysctl_sched_migration_cost; +} + #else /* CONFIG_NO_HZ_COMMON */ static inline bool got_nohz_idle_kick(void) --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -676,7 +676,7 @@ static ktime_t tick_nohz_stop_sched_tick } while (read_seqretry(&jiffies_lock, seq)); ts->last_jiffies = basejiff; - if (rcu_needs_cpu(basemono, &next_rcu) || + if (sched_needs_cpu(cpu) || rcu_needs_cpu(basemono, &next_rcu) || arch_needs_cpu() || irq_work_needs_cpu()) { next_tick = basemono + TICK_NSEC; } else {