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 603553 Details for
Bug 836803
RHEL6: Potential fix for leapsecond caused futex related load spikes
[?]
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 5/7
0005-timekeeping-Provide-hrtimer-update-function.patch (text/plain), 3.40 KB, created by
Prarit Bhargava
on 2012-08-10 13:57:07 UTC
(
hide
)
Description:
RHEL PATCH 5/7
Filename:
MIME Type:
Creator:
Prarit Bhargava
Created:
2012-08-10 13:57:07 UTC
Size:
3.40 KB
patch
obsolete
>From cb0c56b49c23e074d174dd3933e58d4912efda44 Mon Sep 17 00:00:00 2001 >From: Prarit Bhargava <prarit@redhat.com> >Date: Tue, 24 Jul 2012 10:25:35 -0400 >Subject: timekeeping: Provide hrtimer update function > >commit f6c06abfb3972ad4914cef57d8348fcb2932bc3b >Author: Thomas Gleixner <tglx@linutronix.de> >Date: Tue Jul 10 18:43:24 2012 -0400 > > timekeeping: Provide hrtimer update function > > To finally fix the infamous leap second issue and other race windows > caused by functions which change the offsets between the various time > bases (CLOCK_MONOTONIC, CLOCK_REALTIME and CLOCK_BOOTTIME) we need a > function which atomically gets the current monotonic time and updates > the offsets of CLOCK_REALTIME and CLOCK_BOOTTIME with minimalistic > overhead. The previous patch which provides ktime_t offsets allows us > to make this function almost as cheap as ktime_get() which is going to > be replaced in hrtimer_interrupt(). > > Signed-off-by: Thomas Gleixner <tglx@linutronix.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 > Signed-off-by: John Stultz <johnstul@us.ibm.com> > Link: http://lkml.kernel.org/r/1341960205-56738-7-git-send-email-johnstul@us.ibm.com > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > >Note that RHEL6 does not have the CLOCK_REALTIME and CLOCK_BOOTTIME >patches, so ktime_get_update_offsets() only has to be called on the real >clock. >--- > include/linux/hrtimer.h | 1 + > kernel/time/timekeeping.c | 34 ++++++++++++++++++++++++++++++++++ > 2 files changed, 35 insertions(+) > >diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h >index 84ce30b..248fd7f 100644 >--- a/include/linux/hrtimer.h >+++ b/include/linux/hrtimer.h >@@ -319,6 +319,7 @@ extern ktime_t ktime_get(void); > extern ktime_t ktime_get_real(void); > extern ktime_t ktime_get_boottime(void); > extern ktime_t ktime_get_monotonic_offset(void); >+extern ktime_t ktime_get_update_offsets(ktime_t *offs_real); > > DECLARE_PER_CPU(struct tick_device, tick_cpu_device); > >diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c >index 013bafc..47fde33 100644 >--- a/kernel/time/timekeeping.c >+++ b/kernel/time/timekeeping.c >@@ -1253,6 +1253,40 @@ void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, > } while (read_seqretry(&timekeeper.lock, seq)); > } > >+#ifdef CONFIG_HIGH_RES_TIMERS >+/** >+ * ktime_get_update_offsets - hrtimer helper >+ * @offs_real: pointer to storage for monotonic -> realtime offset >+ * >+ * Returns current monotonic time and updates the offsets >+ * Called from hrtimer_interupt() or retrigger_next_event() >+ * >+ * RHEL6: We do not have real vs boot clocks in RHEL. >+ */ >+ktime_t ktime_get_update_offsets(ktime_t *offs_real) >+{ >+ ktime_t now; >+ unsigned int seq; >+ u64 secs, nsecs; >+ >+ do { >+ seq = read_seqbegin(&timekeeper.lock); >+ >+ secs = timekeeper.xtime.tv_sec; >+ nsecs = timekeeper.xtime.tv_nsec; >+ nsecs += timekeeping_get_ns(); >+ /* If arch requires, add in gettimeoffset() */ >+ nsecs += arch_gettimeoffset(); >+ >+ *offs_real = timekeeper.offs_real; >+ } while (read_seqretry(&timekeeper.lock, seq)); >+ >+ now = ktime_add_ns(ktime_set(secs, 0), nsecs); >+ now = ktime_sub(now, *offs_real); >+ return now; >+} >+#endif >+ > /** > * xtime_update() - advances the timekeeping infrastructure > * @ticks: number of ticks, that have elapsed since the last call. >-- >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 836803
:
597663
|
603549
|
603550
|
603551
|
603552
| 603553 |
603554
|
603555