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 603551 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 3/7
0003-timekeeping-Maintain-ktime_t-based-offsets-for-hrtim.patch (text/plain), 3.61 KB, created by
Prarit Bhargava
on 2012-08-10 13:56:57 UTC
(
hide
)
Description:
RHEL PATCH 3/7
Filename:
MIME Type:
Creator:
Prarit Bhargava
Created:
2012-08-10 13:56:57 UTC
Size:
3.61 KB
patch
obsolete
>From b2c8e38a6876a4594dfaac8d305c209cd22d903b Mon Sep 17 00:00:00 2001 >From: Prarit Bhargava <prarit@redhat.com> >Date: Tue, 24 Jul 2012 10:23:25 -0400 >Subject: timekeeping: Maintain ktime_t based offsets for hrtimers > >commit 5b9fe759a678e05be4937ddf03d50e950207c1c0 >Author: Thomas Gleixner <tglx@linutronix.de> >Date: Tue Jul 10 18:43:21 2012 -0400 > > timekeeping: Maintain ktime_t based offsets for hrtimers > > We need to update the hrtimer clock offsets from the hrtimer interrupt > context. To avoid conversions from timespec to ktime_t maintain a > ktime_t based representation of those offsets in the timekeeper. This > puts the conversion overhead into the code which updates the > underlying offsets and provides fast accessible values in the hrtimer > interrupt. > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > Signed-off-by: John Stultz <johnstul@us.ibm.com> > 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-4-git-send-email-johnstul@us.ibm.com > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> >--- > kernel/time/timekeeping.c | 25 +++++++++++++++++++++++-- > 1 file changed, 23 insertions(+), 2 deletions(-) > >diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c >index 2e7e692..013bafc 100644 >--- a/kernel/time/timekeeping.c >+++ b/kernel/time/timekeeping.c >@@ -70,6 +70,12 @@ struct timekeeper { > /* The raw monotonic time for the CLOCK_MONOTONIC_RAW posix clock. */ > struct timespec raw_time; > >+ /* Offset clock monotonic -> clock realtime */ >+ ktime_t offs_real; >+ >+ /* Offset clock monotonic -> clock boottime */ >+ ktime_t offs_boot; >+ > /* Seqlock for all timekeeper values */ > seqlock_t lock; > }; >@@ -172,6 +178,14 @@ static inline s64 timekeeping_get_ns_raw(void) > return clocksource_cyc2ns(cycle_delta, clock->mult, clock->shift); > } > >+static void update_rt_offset(void) >+{ >+ struct timespec tmp, *wtm = &timekeeper.wall_to_monotonic; >+ >+ set_normalized_timespec(&tmp, -wtm->tv_sec, -wtm->tv_nsec); >+ timekeeper.offs_real = timespec_to_ktime(tmp); >+} >+ > /* must hold write on timekeeper.lock */ > static void timekeeping_update(bool clearntp) > { >@@ -179,6 +193,7 @@ static void timekeeping_update(bool clearntp) > timekeeper.ntp_error = 0; > ntp_clear(); > } >+ update_rt_offset(); > update_vsyscall(&timekeeper.xtime, &timekeeper.wall_to_monotonic, > timekeeper.clock, timekeeper.mult); > } >@@ -561,6 +576,7 @@ void __init timekeeping_init(void) > } > set_normalized_timespec(&timekeeper.wall_to_monotonic, > -boot.tv_sec, -boot.tv_nsec); >+ update_rt_offset(); > timekeeper.total_sleep_time.tv_sec = 0; > timekeeper.total_sleep_time.tv_nsec = 0; > write_sequnlock_irqrestore(&timekeeper.lock, flags); >@@ -569,6 +585,12 @@ void __init timekeeping_init(void) > /* time in seconds when suspend began */ > static struct timespec timekeeping_suspend_time; > >+static void update_sleep_time(struct timespec t) >+{ >+ timekeeper.total_sleep_time = t; >+ timekeeper.offs_boot = timespec_to_ktime(t); >+} >+ > /** > * __timekeeping_inject_sleeptime - Internal function to add sleep interval > * @delta: pointer to a timespec delta value >@@ -587,8 +609,7 @@ static void __timekeeping_inject_sleeptime(struct timespec *delta) > timekeeper.xtime = timespec_add(timekeeper.xtime, *delta); > timekeeper.wall_to_monotonic = > timespec_sub(timekeeper.wall_to_monotonic, *delta); >- timekeeper.total_sleep_time = timespec_add( >- timekeeper.total_sleep_time, *delta); >+ update_sleep_time(timespec_add(timekeeper.total_sleep_time, *delta)); > } > > >-- >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