Messages in this thread | | | Subject | Re: [PATCH] revert: timers: fix itimer/many thread hang | From | Peter Zijlstra <> | Date | Fri, 07 Nov 2008 11:19:32 +0100 |
| |
On Thu, 2008-11-06 at 15:53 -0600, Christoph Lameter wrote: > On Thu, 6 Nov 2008, Ingo Molnar wrote: > > > That loop could _perhaps_ be avoided by maintaining the sums from the > > scheduler tick: by just adding the latest delta values for the current > > task to times->*time. Plus at exit time cleaning up the remaining > > delta. That would be a far smaller patch. > > That is a similar scheme to the ZVC (see mm/vmstat.c). Peter: Dont you > have an implementation of a ZVC like scheme for you dirty throttling > patchset that may be useful here?
Sure, we can do something similar to that, but mind you, that's an approximation. Approximations work just fine for vmstats and dirty balancing, I'm just not sure its something people appreciate wrt timers :-)
The trick is to only update the sum when a per-cpu delta overflows, which means the sum will have an error in the order of cpus*delta/2.
| |