Re: [PATCH] revert: timers: fix itimer/many thread hang

From: Peter Zijlstra
Date: Fri Nov 07 2008 - 05:19:12 EST


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.

--
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/