Re: [patch 13/20] timer: Switch to a non cascading wheel

From: Thomas Gleixner
Date: Wed Jun 15 2016 - 12:45:57 EST


On Wed, 15 Jun 2016, Arjan van de Ven wrote:
> what would 1 more timer wheel do?

Waste storage space and make the collection of expired timers more expensive.

The selection of the timer wheel properties is combination of:

1) Granularity

2) Storage space

3) Number of levels to collect

#1 Influences the accuracy of the wheel levels. The worst case error is the
ratio of the shortest timeout in a level and the granularity of that level.

Currently I've chosen 12.5%. If we go to 25% worst case, then we increase
the per level capacity by factor (1 << lvl).

#2 It strikes me a bit silly to waste storage space for esoteric
outliers. According to the data I collected we have no timers at all
between 2hrs and 5 days.

#3 The more levels we have the more steps we have when collecting expired
timers or searching the next expiring timer. It's all bound, but it still
adds up.

Thanks,

tglx