lkml.org 
[lkml]   [2008]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched_clock: prevent scd->clock from moving backwards

* Dave Kleikamp <shaggy@linux.vnet.ibm.com> wrote:

> On Thu, 2008-10-09 at 12:54 -0500, Dave Kleikamp wrote:
>
> > I'll fix the patch and retest it before sending it again.
>
> I'm definitely running with the new patch now. Here goes:
> -------------------------------------------------
> sched_clock: prevent scd->clock from moving backwards
>
> When sched_clock_cpu() couples the clocks between two cpus, it may
> increment scd->clock beyond the GTOD tick window that __update_sched_clock()
> uses to clamp the clock. A later call to __update_sched_clock() may move
> the clock back to scd->tick_gtod + TICK_NSEC, violating the clock's
> monotonic property.
>
> This patch ensures that scd->clock will not be set backward.
>
> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>

applied to tip/sched/clock, thanks Dave!

Ingo


\
 
 \ /
  Last update: 2008-10-10 11:19    [W:2.363 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site