* Re: [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] settimeofday() n
2003-03-14 14:34 [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] Eric Piel
@ 2003-03-14 14:48 ` Matthew Wilcox
2003-03-14 19:29 ` [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] David Mosberger
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2003-03-14 14:48 UTC (permalink / raw)
To: linux-ia64
On Fri, Mar 14, 2003 at 03:34:36PM +0100, Eric Piel wrote:
> I think lines like that from patch-2.5.64 are very suspicious to be
> related to the bug:
> + base->timer_jiffies = INITIAL_JIFFIES;
> + base->tv1.index = INITIAL_JIFFIES & TVR_MASK;
> + base->tv2.index = (INITIAL_JIFFIES >> TVR_BITS) & TVN_MASK;
> + base->tv3.index = (INITIAL_JIFFIES >> (TVR_BITS+TVN_BITS)) & TVN_MASK;
> + base->tv4.index = (INITIAL_JIFFIES >> (TVR_BITS+2*TVN_BITS)) &
> TVN_MASK;
> + base->tv5.index = (INITIAL_JIFFIES >> (TVR_BITS+3*TVN_BITS)) &
> TVN_MASK;
No, I don't think so. Those lines are for starting `jiffies' at a very
high number so we spot jiffie-wrap bugs early on.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH]
2003-03-14 14:34 [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] Eric Piel
2003-03-14 14:48 ` [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] settimeofday() n Matthew Wilcox
@ 2003-03-14 19:29 ` David Mosberger
2003-03-17 7:45 ` [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] settimeofday() n Vitezslav Samel
2003-03-17 13:55 ` [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 Tim Schmielau
3 siblings, 0 replies; 5+ messages in thread
From: David Mosberger @ 2003-03-14 19:29 UTC (permalink / raw)
To: linux-ia64
>>>>> On Fri, 14 Mar 2003 15:34:36 +0100, Eric Piel <Eric.Piel@Bull.Net> said:
Eric> Sure, I aim at porting the high resolution timers but any
Eric> annoying bug related to the time can be interesting to remove.
Great! It would be great to have someone who can focus on that.
Eric> Any idea/sugestion/patch is welcomed. Whatever, I will try to
Eric> fix this as soon as I'm back from my week end :-)
Does the x86 show the same behavior? That would be a useful start to
narrow down the problem.
--david
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] settimeofday() n
2003-03-14 14:34 [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] Eric Piel
2003-03-14 14:48 ` [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] settimeofday() n Matthew Wilcox
2003-03-14 19:29 ` [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] David Mosberger
@ 2003-03-17 7:45 ` Vitezslav Samel
2003-03-17 13:55 ` [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 Tim Schmielau
3 siblings, 0 replies; 5+ messages in thread
From: Vitezslav Samel @ 2003-03-17 7:45 UTC (permalink / raw)
To: linux-ia64
On Fri, Mar 14, 2003 at 02:48:59PM +0000, Matthew Wilcox wrote:
> On Fri, Mar 14, 2003 at 03:34:36PM +0100, Eric Piel wrote:
> > I think lines like that from patch-2.5.64 are very suspicious to be
> > related to the bug:
> > + base->timer_jiffies = INITIAL_JIFFIES;
> > + base->tv1.index = INITIAL_JIFFIES & TVR_MASK;
> > + base->tv2.index = (INITIAL_JIFFIES >> TVR_BITS) & TVN_MASK;
> > + base->tv3.index = (INITIAL_JIFFIES >> (TVR_BITS+TVN_BITS)) & TVN_MASK;
> > + base->tv4.index = (INITIAL_JIFFIES >> (TVR_BITS+2*TVN_BITS)) &
> > TVN_MASK;
> > + base->tv5.index = (INITIAL_JIFFIES >> (TVR_BITS+3*TVN_BITS)) &
> > TVN_MASK;
>
> No, I don't think so. Those lines are for starting `jiffies' at a very
> high number so we spot jiffie-wrap bugs early on.
The nanosleep() bug narrowed down to 2.5.63-bk2. That's version, the "initial
jiffies" patch went in. And yes, it's on i686 machine.
Cheers,
Vita
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64
2003-03-14 14:34 [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] Eric Piel
` (2 preceding siblings ...)
2003-03-17 7:45 ` [Linux-ia64] Re: [BUG] nanosleep() granularity bumps up in 2.5.64 (was: [PATCH] settimeofday() n Vitezslav Samel
@ 2003-03-17 13:55 ` Tim Schmielau
3 siblings, 0 replies; 5+ messages in thread
From: Tim Schmielau @ 2003-03-17 13:55 UTC (permalink / raw)
To: linux-ia64
On Mon, 17 Mar 2003, Vitezslav Samel wrote:
> On Fri, Mar 14, 2003 at 02:48:59PM +0000, Matthew Wilcox wrote:
> > On Fri, Mar 14, 2003 at 03:34:36PM +0100, Eric Piel wrote:
> > > I think lines like that from patch-2.5.64 are very suspicious to be
> > > related to the bug:
> > > + base->timer_jiffies = INITIAL_JIFFIES;
> > > + base->tv1.index = INITIAL_JIFFIES & TVR_MASK;
> > > + base->tv2.index = (INITIAL_JIFFIES >> TVR_BITS) & TVN_MASK;
> > > + base->tv3.index = (INITIAL_JIFFIES >> (TVR_BITS+TVN_BITS)) & TVN_MASK;
> > > + base->tv4.index = (INITIAL_JIFFIES >> (TVR_BITS+2*TVN_BITS)) &
> > > TVN_MASK;
> > > + base->tv5.index = (INITIAL_JIFFIES >> (TVR_BITS+3*TVN_BITS)) &
> > > TVN_MASK;
> >
> > No, I don't think so. Those lines are for starting `jiffies' at a very
> > high number so we spot jiffie-wrap bugs early on.
>
> The nanosleep() bug narrowed down to 2.5.63-bk2. That's version, the "initial
> jiffies" patch went in. And yes, it's on i686 machine.
You can easily check whether it's connected with this change by setting
INITIAL_JIFFIES to zero. This should exactly recover the previous
situation.
I.e., something like the following (untested, hand-crafted) patch:
--- linux-2.5.64/include/linux/time.h
+++ linux-2.5.64/include/linux/time.h
@@ -28,7 +28,7 @@
* Have the 32 bit jiffies value wrap 5 minutes after boot
* so jiffies wrap bugs show up earlier.
*/
- #define INITIAL_JIFFIES ((unsigned int) (-300*HZ))
+ #define INITIAL_JIFFIES 0
/*
* Change timeval to jiffies, trying to avoid the
Tim
^ permalink raw reply [flat|nested] 5+ messages in thread