Re: [patch 00/43] ktimer reworked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2 Dec 2005, Roman Zippel wrote:

Hi,

On Thu, 1 Dec 2005, Kyle Moffett wrote:

My _point_ is that some code doesn't care about accuracy.

That's not how it works, the timer wheel is accurate within its
resolution.

but the point that is being made is that while this is true, there is a large group of functions that really don't care (the timeout case), and for that type of use it's possible to do some optimizations that make it extremely efficiant.

In addition, once you remove the bulk of these uses from the picture (by makeing them use a new timer type that's optimized for their useage pattern, the 'unlikly to expire' case) the remainder of the timer users easily fall into the catagory where the timer is expected to expire, so that code can accept a performance hit for removing events prior to them going off that would not be acceptable in a general case version.

the example of this is the networking timers. they almost never go off, but one is set for just about every packet that's processed. so adding any overhead in removing the unexpired timer has a large impact on performance.

but once this large group of timer users are removed, (along with a few other similar watchdog timers for disk I/O, etc) the remaining users will almost never remove the event before it goes off, so the code can be optimized for that situation (including things that would increase the cost to remove the unexpired event) and gain precision and possibly performance as well.

would the term 'watchdog' or 'watchdog_timer' for what's been refered to as the timeout timer make more sense to people? it's used when you need to setup a safety net around the possibility that an event won't happen, it's guarenteed not to fire before the time specified, but may have it's activation delayed slightly past that point.

then the rest of the uses could use the term 'timer', and that code is optimized for the timer actually expireing, removing an event that has not expired will be relativly costly.

David Lang

--
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux