From: tip-bot for Viresh Kumar <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, john.stultz@linaro.org,
hpa@zytor.com, mingo@kernel.org, viresh.kumar@linaro.org,
tglx@linutronix.de
Subject: [tip:timers/urgent] tick-sched: Don't call update_wall_time() when delta is lesser than tick_period
Date: Tue, 15 Apr 2014 11:45:44 -0700 [thread overview]
Message-ID: <tip-03e6bdc5c4d0fc166bfd5d3cf749a5a0c1b5b1bd@git.kernel.org> (raw)
In-Reply-To: <80afb18a494b0bd9710975bcc4de134ae323c74f.1397537987.git.viresh.kumar@linaro.org>
Commit-ID: 03e6bdc5c4d0fc166bfd5d3cf749a5a0c1b5b1bd
Gitweb: http://git.kernel.org/tip/03e6bdc5c4d0fc166bfd5d3cf749a5a0c1b5b1bd
Author: Viresh Kumar <viresh.kumar@linaro.org>
AuthorDate: Tue, 15 Apr 2014 10:54:40 +0530
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 15 Apr 2014 20:26:45 +0200
tick-sched: Don't call update_wall_time() when delta is lesser than tick_period
In tick_do_update_jiffies64() we are processing ticks only if delta is
greater than tick_period. This is what we are supposed to do here and
it broke a bit with this patch:
commit 47a1b796 (tick/timekeeping: Call update_wall_time outside the
jiffies lock)
With above patch, we might end up calling update_wall_time() even if
delta is found to be smaller that tick_period. Fix this by returning
when the delta is less than tick period.
[ tglx: Made it a 3 liner and massaged changelog ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linaro-kernel@lists.linaro.org
Cc: fweisbec@gmail.com
Cc: Arvind.Chauhan@arm.com
Cc: linaro-networking@linaro.org
Cc: John Stultz <john.stultz@linaro.org>
Cc: <stable@vger.kernel.org> # v3.14+
Link: http://lkml.kernel.org/r/80afb18a494b0bd9710975bcc4de134ae323c74f.1397537987.git.viresh.kumar@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/tick-sched.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 9f8af69..e947d96 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -84,6 +84,9 @@ static void tick_do_update_jiffies64(ktime_t now)
/* Keep the tick_next_period variable up to date */
tick_next_period = ktime_add(last_jiffies_update, tick_period);
+ } else {
+ write_sequnlock(&jiffies_lock);
+ return;
}
write_sequnlock(&jiffies_lock);
update_wall_time();
prev parent reply other threads:[~2014-04-15 18:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 5:24 [PATCH V1 Resend 0/5] tick: bugfixes Viresh Kumar
2014-04-15 5:24 ` [PATCH V1 Resend 2/5] tick-common: don't check tick_oneshot_mode_active() from tick_check_preferred() Viresh Kumar
2014-04-15 18:30 ` Thomas Gleixner
2014-04-16 4:07 ` Viresh Kumar
2014-04-15 5:24 ` [PATCH V1 Resend 3/5] tick-common: do additional checks in tick_check_preferred() Viresh Kumar
[not found] ` <486a02efe0246635aaba786e24b42d316438bf3b.1397537987.git.viresh.kumar@linaro.org>
2014-04-15 18:42 ` [PATCH V1 Resend 1/5] tick-common: fix wrong check in tick_check_replacement() Thomas Gleixner
2014-04-16 4:11 ` Viresh Kumar
2014-04-15 18:45 ` [tip:timers/urgent] tick-common: Fix " tip-bot for Viresh Kumar
[not found] ` <80afb18a494b0bd9710975bcc4de134ae323c74f.1397537987.git.viresh.kumar@linaro.org>
2014-04-15 18:44 ` [PATCH V1 Resend 4/5] tick-sched: don't call update_wall_time() when delta is lesser than tick_period Thomas Gleixner
2014-04-16 4:20 ` Viresh Kumar
2014-04-15 18:45 ` tip-bot for Viresh Kumar [this message]
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=tip-03e6bdc5c4d0fc166bfd5d3cf749a5a0c1b5b1bd@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.org \
/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
Powered by JetHome