From: Peter Zijlstra <peterz@infradead.org>
To: Norbert Preining <preining@logic.at>
Cc: Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
akpm <akpm@linux-foundation.org>, Mike Galbraith <efault@gmx.de>
Subject: Re: high power consumption in recent kernels
Date: Thu, 08 Jul 2010 14:22:59 +0200 [thread overview]
Message-ID: <1278591779.1900.97.camel@laptop> (raw)
In-Reply-To: <20100708120421.GF20841@gamma.logic.tuwien.ac.at>
On Thu, 2010-07-08 at 21:04 +0900, Norbert Preining wrote:
> Just one more point, searching a bit more in the net I found the following
> patch (forgot who wrote it) which I merged into my current git:
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index a878b53..f26efba 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -3248,6 +3248,9 @@ int select_nohz_load_balancer(int stop_tick)
> if (stop_tick) {
> cpu_rq(cpu)->in_nohz_recently = 1;
>
> + if (!mc_capable())
> + return 0;
> +
> if (!cpu_active(cpu)) {
> if (atomic_read(&nohz.load_balancer) != cpu)
> return 0;
> @@ -3297,6 +3300,9 @@ int select_nohz_load_balancer(int stop_tick)
> if (!cpumask_test_cpu(cpu, nohz.cpu_mask))
> return 0;
>
> + if (!mc_capable())
> + return 0;
> +
> cpumask_clear_cpu(cpu, nohz.cpu_mask);
>
> if (atomic_read(&nohz.load_balancer) == cpu)
Right, so that is a buggy patch, see the original discussion:
http://lkml.org/lkml/2010/4/26/249
> which looks better
The thing is, we didn't change that code recently, the patches that are
supposed to cure the nohz balancer are still pending (in -tip and
-next).
That said, we did frob something with the whole nohz thing, does the
below cure anything:
---
kernel/time/tick-sched.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 813993b..9bc8029 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -325,7 +325,7 @@ void tick_nohz_stop_sched_tick(int inidle)
} while (read_seqretry(&xtime_lock, seq));
if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) ||
- arch_needs_cpu(cpu) || nohz_ratelimit(cpu)) {
+ arch_needs_cpu(cpu) /* || nohz_ratelimit(cpu) */) {
next_jiffies = last_jiffies + 1;
delta_jiffies = 1;
} else {
next prev parent reply other threads:[~2010-07-08 12:23 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 16:45 high power consumption in recent kernels Norbert Preining
2010-07-08 9:06 ` Peter Zijlstra
2010-07-08 11:57 ` Arjan van de Ven
2010-07-08 11:58 ` Peter Zijlstra
2010-07-08 12:04 ` Norbert Preining
2010-07-08 12:22 ` Peter Zijlstra [this message]
2010-07-08 12:46 ` Norbert Preining
2010-07-08 13:23 ` Peter Zijlstra
2010-07-08 15:59 ` Peter Zijlstra
2010-07-08 19:06 ` Peter Zijlstra
2010-07-08 19:40 ` Mike Galbraith
2010-07-08 20:44 ` Peter Zijlstra
2010-07-09 3:08 ` Arjan van de Ven
2010-07-09 5:55 ` Mike Galbraith
2010-07-08 19:37 ` Mike Galbraith
2010-07-08 15:11 ` Arjan van de Ven
2010-07-09 19:09 ` Pavel Machek
[not found] <1283840425.26157.6486.camel@debian>
[not found] ` <20100909093140.GC29648@gamma.logic.tuwien.ac.at>
[not found] ` <EA929A9653AAE14F841771FB1DE5A1366008738EC2@rrsmsx501.amr.corp.intel.com>
[not found] ` <20100909205115.GD11053@gamma.logic.tuwien.ac.at>
[not found] ` <1284107099.402.30.camel@laptop>
2010-09-10 14:48 ` Shi, Alex
2010-09-10 14:54 ` Norbert Preining
2010-09-13 5:21 ` Alex,Shi
2010-09-17 2:09 ` Alex,Shi
2010-09-22 15:44 ` Norbert Preining
2010-09-28 10:40 ` Alex,Shi
2010-09-29 14:39 ` Norbert Preining
2010-09-29 15:48 ` Chen, Tim C
2010-09-30 0:50 ` Alex,Shi
2010-09-30 2:01 ` Norbert Preining
2010-09-30 6:59 ` Norbert Preining
2010-09-30 8:27 ` Alex,Shi
2010-09-30 12:36 ` Peter Zijlstra
2010-09-30 13:21 ` Shi, Alex
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=1278591779.1900.97.camel@laptop \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=preining@logic.at \
/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