Re: Move accounting function calls out of critical vm code paths

From: Matt Mackall
Date: Sun Jan 09 2005 - 21:44:28 EST


On Wed, Jan 05, 2005 at 04:55:14PM -0800, Christoph Lameter wrote:

> One disadvantage is that rss etc may now peak between stime
> increments without being noticed. But I think we are mostly
> interested in prolonged memory use rather than accurate data on the
> max rss ever reached.

This has the downside that applications may die well after the event
that caused the excess. Also, I can see situations in RT where strict
limits are put in place to ensure that particular apps are never
starved so strict accounting is occassionally desireable.

Perhaps we could do the accounting on the fly iff we have an rlimit in
the first place and we're already over half of it? Such strict
accounting could triggered by a process flag turned off and on inside
acct_update_integrals.

One also wonders if once per timer tick is more processing for compute
intensive workloads.

Finally, do { } while (0); is a bit of cargo cult. The compilers no
longer warn for empty statements so a null #define is fine.

--
Mathematics is the supreme nostalgia of our time.
-
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/