lkml.org 
[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] [RFC] hrtimer: Update hrtimer base offsets each hrtimer_interrupt


On 07/04/2012 02:21 AM, John Stultz wrote:
> This patch introduces a new funciton which captures the
> CLOCK_MONOTONIC time, along with the CLOCK_REALTIME and
> CLOCK_BOOTTIME offsets at the same moment. This new function
> is then used in place of ktime_get() when hrtimer_interrupt()
> is expiring timers.
>
> This ensures that any changes to realtime or boottime offsets
> are noticed and stored into the per-cpu hrtimer base structures,
> prior to doing any hrtimer expiration. This should ensure that
> timers are not expired early if the offsets changes under us.
>
> This is useful in the case where clock_was_set() is called from
> atomic context and have to schedule the hrtimer base offset update
> via a timer, as it provides extra robustness in the face of any
> possible timer delay.
>
> CC: Prarit Bhargava <prarit@redhat.com>
> CC: stable@vger.kernel.org
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: linux@openhuawei.org
> Signed-off-by: John Stultz <johnstul@us.ibm.com>

Acked-by: Prarit Bhargava <prarit@redhat.com>

P.


\
 
 \ /
  Last update: 2012-07-05 20:21    [W:0.073 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site