Re: [PATCH] 2.5.43 CSA, Job, and PAGG

From: Dave Jones (davej@codemonkey.org.uk)
Date: Thu Oct 17 2002 - 13:52:27 EST


On Thu, Oct 17, 2002 at 12:50:52PM -0500, Robin Holt wrote:

> > The first two lines in the csa patch contain an obvious jiffy-wrap bug.
>
> Fixed. The patch file named above is now a link to
> linux-2.5.43_002-csa.patch. The old file is linux-2.5.43_001-csa.patch
>
> If you could re-review, I would appreciate it.

Casting it to a ulong won't help you.
Imagine jiffies begins at 0xffffffff

        unsigned long start_wait = jiffies;
        ...
        current->bwtime += (unsigned long) jiffies - start_wait;

and when you read it the second time, it's rolled over to 0x00000001

You now increment bwtime by $BIGNUM

-- 
| Dave Jones.        http://www.codemonkey.org.uk
-
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/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:36 EST