]> git.baikalelectronics.ru Git - kernel.git/commit
slub: allow stats to be cleared
authorDavid Rientjes <rientjes@google.com>
Thu, 15 Oct 2009 09:20:22 +0000 (02:20 -0700)
committerPekka Enberg <penberg@cs.helsinki.fi>
Thu, 15 Oct 2009 18:34:12 +0000 (21:34 +0300)
commit82c7d867a536ad4b02c4445abd08aa00fa017c57
treec0cefa5b5787bb234ba8931775da2071c908e071
parent77f011e468b3aa9e5b781c5dd64b166cf38a1976
slub: allow stats to be cleared

When collecting slub stats for particular workloads, it's necessary to
collect each statistic for all caches before the job is even started
because the counters are usually greater than zero just from boot and
initialization.

This allows a statistic to be cleared on each cpu by writing '0' to its
sysfs file.  This creates a baseline for statistics of interest before
the workload is started.

Setting a statistic to a particular value is not supported, so all values
written to these files other than '0' returns -EINVAL.

Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Documentation/ABI/testing/sysfs-kernel-slab
mm/slub.c