From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: linux-next@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>,
"Woodruff, Richard" <r-woodruff2@ti.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: linux-next: manual merge of the timers tree
Date: Mon, 29 Dec 2008 13:02:24 +1100 [thread overview]
Message-ID: <20081229130224.e792474a.sfr@canb.auug.org.au> (raw)
Hi all,
Today's linux-next merge of the timers tree got a conflict in
kernel/time/tick-sched.c between commit
6a7b3dc3440f7b5a9b67594af01ed562cdeb41e4 ("sched: convert nohz_cpu_mask
to cpumask_var_t") from the cpus4096 tree and commit
001474491fabeca233168a8598f721c808040f90 ("nohz: suppress needless timer
reprogramming") from the timers tree.
Just context changing. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff --cc kernel/time/tick-sched.c
index 70f872c,8f3fc25..0000000
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@@ -282,8 -282,31 +282,31 @@@ void tick_nohz_stop_sched_tick(int inid
/* Schedule the tick, if we are at least one jiffie off */
if ((long)delta_jiffies >= 1) {
+ /*
+ * calculate the expiry time for the next timer wheel
+ * timer
+ */
+ expires = ktime_add_ns(last_update, tick_period.tv64 *
+ delta_jiffies);
+
+ /*
+ * If this cpu is the one which updates jiffies, then
+ * give up the assignment and let it be taken by the
+ * cpu which runs the tick timer next, which might be
+ * this cpu as well. If we don't drop this here the
+ * jiffies might be stale and do_timer() never
+ * invoked.
+ */
+ if (cpu == tick_do_timer_cpu)
+ tick_do_timer_cpu = TICK_DO_TIMER_NONE;
+
if (delta_jiffies > 1)
- cpu_set(cpu, nohz_cpu_mask);
+ cpumask_set_cpu(cpu, nohz_cpu_mask);
+
+ /* Skip reprogram of event if its not changed */
+ if (ts->tick_stopped && ktime_equal(expires, dev->next_event))
+ goto out;
+
/*
* nohz_stop_sched_tick can be called several times before
* the nohz_restart_sched_tick is called. This happens when
next reply other threads:[~2008-12-29 2:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-29 2:02 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-10-21 1:43 linux-next: manual merge of the timers tree Stephen Rothwell
2008-10-21 12:15 ` Ingo Molnar
2008-10-21 12:18 ` Stephen Rothwell
2008-10-14 6:12 Stephen Rothwell
2008-10-14 6:03 Stephen Rothwell
2008-10-14 5:59 Stephen Rothwell
2008-10-14 5:51 Stephen Rothwell
2008-09-12 7:10 Stephen Rothwell
2008-09-12 6:57 Stephen Rothwell
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=20081229130224.e792474a.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=r-woodruff2@ti.com \
--cc=rusty@rustcorp.com.au \
--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