Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 603996 Details for
Bug 840948
livelock in leapsecond insertion [rhel-6.1.z]
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
RHEL PATCH 2/3
0002-RHEL6.1.z-PATCH-BZ-847364-2-3-hrtimer-Provide-clock_.patch (text/plain), 3.93 KB, created by
Prarit Bhargava
on 2012-08-13 13:00:51 UTC
(
hide
)
Description:
RHEL PATCH 2/3
Filename:
MIME Type:
Creator:
Prarit Bhargava
Created:
2012-08-13 13:00:51 UTC
Size:
3.93 KB
patch
obsolete
>From 0938950df4c847bed040d14a716cc3ead9ea844c Mon Sep 17 00:00:00 2001 >From: Prarit Bhargava <prarit@redhat.com> >Date: Tue, 24 Jul 2012 10:20:33 -0400 >Subject: [PATCH 2/3] [RHEL6.1.z PATCH BZ 847364 2/3] hrtimer: Provide > clock_was_set_delayed() > >Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=847364 >Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=840948 > >commit f55a6faa384304c89cfef162768e88374d3312cb >Author: John Stultz <johnstul@us.ibm.com> >Date: Tue Jul 10 18:43:19 2012 -0400 > > hrtimer: Provide clock_was_set_delayed() > > clock_was_set() cannot be called from hard interrupt context because > it calls on_each_cpu(). > > For fixing the widely reported leap seconds issue it is necessary to > call it from hard interrupt context, i.e. the timer tick code, which > does the timekeeping updates. > > Provide a new function which denotes it in the hrtimer cpu base > structure of the cpu on which it is called and raise the hrtimer > softirq. We then execute the clock_was_set() notificiation from > softirq context in run_hrtimer_softirq(). The hrtimer softirq is > rarely used, so polling the flag there is not a performance issue. > > [ tglx: Made it depend on CONFIG_HIGH_RES_TIMERS. We really should get > rid of all this ifdeffery ASAP ] > > Signed-off-by: John Stultz <johnstul@us.ibm.com> > Reported-by: Jan Engelhardt <jengelh@inai.de> > Reviewed-by: Ingo Molnar <mingo@kernel.org> > Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> > Acked-by: Prarit Bhargava <prarit@redhat.com> > Cc: stable@vger.kernel.org > Link: http://lkml.kernel.org/r/1341960205-56738-2-git-send-email-johnstul@us.ibm.com > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> >--- > include/linux/hrtimer.h | 9 +++++++++ > kernel/hrtimer.c | 20 ++++++++++++++++++++ > 2 files changed, 29 insertions(+) > >diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h >index 040b679..1e30dd1 100644 >--- a/include/linux/hrtimer.h >+++ b/include/linux/hrtimer.h >@@ -167,6 +167,7 @@ struct hrtimer_clock_base { > * @nr_retries: Total number of hrtimer interrupt retries > * @nr_hangs: Total number of hrtimer interrupt hangs > * @max_hang_time: Maximum time spent in hrtimer_interrupt >+ * @clock_was_set: Indicates that clock was set from irq context. > */ > struct hrtimer_cpu_base { > spinlock_t lock; >@@ -180,6 +181,9 @@ struct hrtimer_cpu_base { > unsigned long nr_hangs; > ktime_t max_hang_time; > #endif >+#ifndef __GENKSYMS__ >+ unsigned int clock_was_set; >+#endif > }; > > static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) >@@ -280,6 +284,8 @@ extern void hrtimer_peek_ahead_timers(void); > # define MONOTONIC_RES_NSEC HIGH_RES_NSEC > # define KTIME_MONOTONIC_RES KTIME_HIGH_RES > >+extern void clock_was_set_delayed(void); >+ > #else > > # define MONOTONIC_RES_NSEC LOW_RES_NSEC >@@ -308,6 +314,9 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer) > { > return 0; > } >+ >+static inline void clock_was_set_delayed(void) { } >+ > #endif > > extern ktime_t ktime_get(void); >diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c >index 75daf03..ebb4a70 100644 >--- a/kernel/hrtimer.c >+++ b/kernel/hrtimer.c >@@ -734,6 +734,19 @@ static int hrtimer_switch_to_hres(void) > return 1; > } > >+/* >+ * Called from timekeeping code to reprogramm the hrtimer interrupt >+ * device. If called from the timer interrupt context we defer it to >+ * softirq context. >+ */ >+void clock_was_set_delayed(void) >+{ >+ struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); >+ >+ cpu_base->clock_was_set = 1; >+ __raise_softirq_irqoff(HRTIMER_SOFTIRQ); >+} >+ > #else > > static inline int hrtimer_hres_active(void) { return 0; } >@@ -1380,6 +1393,13 @@ void hrtimer_peek_ahead_timers(void) > > static void run_hrtimer_softirq(struct softirq_action *h) > { >+ struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); >+ >+ if (cpu_base->clock_was_set) { >+ cpu_base->clock_was_set = 0; >+ clock_was_set(); >+ } >+ > hrtimer_peek_ahead_timers(); > } > >-- >1.7.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 840948
:
603995
| 603996 |
603997