Messages in this thread | | | Date | Sun, 18 Oct 1998 15:48:02 +0200 (CEST) | From | MOLNAR Ingo <> | Subject | Re: [patch] jiffies wraparound [Re: 2.1.125 Show stopper list: Draft] |
| |
On Sun, 18 Oct 1998, Rogier Wolff wrote:
> > the right thing i think is a 'delta' timeout instead of an absolute > > timeout, but this is definitely not a 2.2 issue. Since most places > > artifically add 'jiffies' to some delta timeout anyway before setting > > current->timeout, this looks clean as well. > > Hi mingo, > > This probably all happened before you were born :-), but we changed > the other way around, exactly because we wanted to avoid the > wraparound issue.
i have specifically ment the 'manual process timeout thing' used often:
current->timeout = jiffies + HZ/10; schedule();
this '->timeout' meaning should i think be changed to a delta timeout. Note that this timeout value gets cleared explicitly when the (implicit) timer has finished.
> > Also: > If I want to have my timer called every second, I do > > newtimeout = oldtimeout +HZ;
yes i understand this and i have not ment regular timers to be affected, just this 'p->timeout' thing. (timers have no timeout field anyway, it's called ->expires, which has a very clear absolute meaning)
but probably the best way for 2.3 will be to remove the p->timeout thing from schedule() completely, and add a schedule_with_timeout(timeout) wrapper. This will improve performance of schedule() and will fix the wrap bug too.
-- mingo
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |