Re: [RFC] mod_timer() helper functions?

From: Andi Kleen
Date: Wed May 20 2009 - 04:09:05 EST


> /**
> * timer_settime_msecs - modify a timer's timeout
> * @timer: the timer to be modified
> * @msecs: minimum time in milliseconds to sleep for
> */
> int timer_settime_msecs(struct timer_list *timer, int msecs)

At least this function needs something that indicates it is very approximate
(upto 900% error for 1ms with HZ=100)
The old open coded pattern showed this.

Or perhaps better drop the msecs version and just keep the seconds version.

People who want msecs accuracy likely should use hrtimers anyways.

-Andi

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