From: Arjan van de Ven <arjan@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, linux-arch@vger.kernel.org
Subject: [patch] Remove the per cpu tick skew
Date: Tue, 27 Jul 2010 21:02:10 -0700 [thread overview]
Message-ID: <20100727210210.58d3118c@infradead.org> (raw)
Hi,
the following patch is a win for power management on x86....
... but since this touches generic code.. are there any
other architectures that would be negatively affected by this?
Subject: [patch] Remove the per cpu tick skew
Historically, Linux has tried to make the regular timer tick on the various
CPUs not happen at the same time, to avoid contention on xtime_lock.
Nowadays, with the tickless kernel, this contention no longer happens
since time keeping and updating are done differently. In addition,
this skew is actually hurting power consumption in a measurable
way on many-core systems.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
--- linux.trees.git/kernel/time/tick-sched.c~ 2010-07-16 09:40:50.000000000 -0400
+++ linux.trees.git/kernel/time/tick-sched.c 2010-07-26 11:18:51.138003329 -0400
@@ -780,7 +780,6 @@
{
struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
ktime_t now = ktime_get();
- u64 offset;
/*
* Emulate tick processing via per-CPU hrtimers:
@@ -790,10 +789,6 @@
/* Get the next period (per cpu) */
hrtimer_set_expires(&ts->sched_timer, tick_init_jiffy_update());
- offset = ktime_to_ns(tick_period) >> 1;
- do_div(offset, num_possible_cpus());
- offset *= smp_processor_id();
- hrtimer_add_expires_ns(&ts->sched_timer, offset);
for (;;) {
hrtimer_forward(&ts->sched_timer, now, tick_period);
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
next reply other threads:[~2010-07-28 4:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 4:02 Arjan van de Ven [this message]
2010-07-28 20:26 ` [patch] Remove the per cpu tick skew john stultz
2010-07-28 23:50 ` john stultz
2010-07-30 7:27 ` Nick Piggin
2010-07-30 7:27 ` Nick Piggin
2010-07-30 13:57 ` Arjan van de Ven
2010-07-30 13:57 ` Arjan van de Ven
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=20100727210210.58d3118c@infradead.org \
--to=arjan@infradead.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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).