lkml.org 
[lkml]   [2011]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] time: xtime_lock is held too long
From
Date
On Fri, 2011-05-06 at 19:42 +0200, Eric Dumazet wrote:
> Le vendredi 06 mai 2011 à 18:59 +0200, Andi Kleen a écrit :
>
> > If you have a better way to make it faster please share it.
>
> Ideally we could use RCU :)
>
> Have whatever state hold in one structure (possibly big, it doesnt
> matter) and switch pointer in writer once everything is setup in new
> structure.

Yea. RCU is tough though, because we do need the hardware cycle value
that we use to be valid for the current interval stored in the
timekeeper structure (ie: the cycle value can't be before the current
cycle_last, and it can't be greater then the next cycle_last).

The reason being, that should a frequency correction occur, you might
end up applying the old frequency to a longer interval then desired,
which could cause small timekeeping inconsistencies.

So we really do need a way to ensure that gettimeofday calls fall on one
side or the other of the accumulation loop. We may be able to tighten
that window some, but I don't know if RCU will work.

thanks
-john

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-05-06 22:21    [W:0.112 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site