linux/include
Paul Jackson 3e0d98b9f1 [PATCH] cpuset: memory pressure meter
Provide a simple per-cpuset metric of memory pressure, tracking the -rate-
that the tasks in a cpuset call try_to_free_pages(), the synchronous
(direct) memory reclaim code.

This enables batch managers monitoring jobs running in dedicated cpusets to
efficiently detect what level of memory pressure that job is causing.

This is useful both on tightly managed systems running a wide mix of
submitted jobs, which may choose to terminate or reprioritize jobs that are
trying to use more memory than allowed on the nodes assigned them, and with
tightly coupled, long running, massively parallel scientific computing jobs
that will dramatically fail to meet required performance goals if they
start to use more memory than allowed to them.

This patch just provides a very economical way for the batch manager to
monitor a cpuset for signs of memory pressure.  It's up to the batch
manager or other user code to decide what to do about it and take action.

==> Unless this feature is enabled by writing "1" to the special file
    /dev/cpuset/memory_pressure_enabled, the hook in the rebalance
    code of __alloc_pages() for this metric reduces to simply noticing
    that the cpuset_memory_pressure_enabled flag is zero.  So only
    systems that enable this feature will compute the metric.

Why a per-cpuset, running average:

    Because this meter is per-cpuset, rather than per-task or mm, the
    system load imposed by a batch scheduler monitoring this metric is
    sharply reduced on large systems, because a scan of the tasklist can be
    avoided on each set of queries.

    Because this meter is a running average, instead of an accumulating
    counter, a batch scheduler can detect memory pressure with a single
    read, instead of having to read and accumulate results for a period of
    time.

    Because this meter is per-cpuset rather than per-task or mm, the
    batch scheduler can obtain the key information, memory pressure in a
    cpuset, with a single read, rather than having to query and accumulate
    results over all the (dynamically changing) set of tasks in the cpuset.

A per-cpuset simple digital filter (requires a spinlock and 3 words of data
per-cpuset) is kept, and updated by any task attached to that cpuset, if it
enters the synchronous (direct) page reclaim code.

A per-cpuset file provides an integer number representing the recent
(half-life of 10 seconds) rate of direct page reclaims caused by the tasks
in the cpuset, in units of reclaims attempted per second, times 1000.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:42 -08:00
..
acpi [ACPI] increase owner_id limit to 64 from 32 2005-12-21 04:52:16 -05:00
asm-alpha [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-arm [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-arm26 [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-cris [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-frv [PATCH] frv: miscellaneous changes 2006-01-08 20:13:38 -08:00
asm-generic [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-h8300 [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-i386 [PATCH] Kill L1_CACHE_SHIFT_MAX 2006-01-08 20:13:39 -08:00
asm-ia64 [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-m32r [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-m68k [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-m68knommu [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-mips [PATCH] Kill L1_CACHE_SHIFT_MAX 2006-01-08 20:13:39 -08:00
asm-parisc [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-powerpc [PATCH] Kill L1_CACHE_SHIFT_MAX 2006-01-08 20:13:39 -08:00
asm-ppc [PATCH] ppc32: Allows compilation of a MPC52xx kernel without PCI 2006-01-06 08:33:31 -08:00
asm-s390 [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-sh [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-sh64 [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-sparc [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-sparc64 [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-um [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-v850 [PATCH] consolidate asm/futex.h 2006-01-08 20:13:39 -08:00
asm-x86_64 [PATCH] Kill L1_CACHE_SHIFT_MAX 2006-01-08 20:13:39 -08:00
asm-xtensa [PATCH] atomic_long_t & include/asm-generic/atomic.h V2 2006-01-06 08:33:29 -08:00
keys [PATCH] Keys: Remove key duplication 2006-01-06 08:33:29 -08:00
linux [PATCH] cpuset: memory pressure meter 2006-01-08 20:13:42 -08:00
math-emu
media Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6 2006-01-06 15:25:08 -08:00
mtd [MTD] user-abi: Clean up trailing white spaces 2005-11-07 14:43:11 +01:00
net [IPV4]: make ip_fragment() static 2006-01-07 13:23:39 -08:00
pcmcia [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback 2006-01-06 00:03:24 +01:00
rdma [IB] uverbs: have kernel return QP capabilities 2005-11-10 10:22:50 -08:00
rxrpc [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
scsi Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-block 2006-01-06 09:01:25 -08:00
sound [ALSA] Revert the nested-device patch 2006-01-04 10:13:48 +01:00
video [PATCH] drivers/video: Replace custom macro with isdigit() 2005-09-13 08:22:33 -07:00