linux/Documentation
Andi Kleen 4fd466eb46 HWPOISON: add memory cgroup filter
The hwpoison test suite need to inject hwpoison to a collection of
selected task pages, and must not touch pages not owned by them and
thus kill important system processes such as init. (But it's OK to
mis-hwpoison free/unowned pages as well as shared clean pages.
Mis-hwpoison of shared dirty pages will kill all tasks, so the test
suite will target all or non of such tasks in the first place.)

The memory cgroup serves this purpose well. We can put the target
processes under the control of a memory cgroup, and tell the hwpoison
injection code to only kill pages associated with some active memory
cgroup.

The prerequisite for doing hwpoison stress tests with mem_cgroup is,
the mem_cgroup code tracks task pages _accurately_ (unless page is
locked).  Which we believe is/should be true.

The benefits are simplification of hwpoison injector code. Also the
mem_cgroup code will automatically be tested by hwpoison test cases.

The alternative interfaces pin-pfn/unpin-pfn can also delegate the
(process and page flags) filtering functions reliably to user space.
However prototype implementation shows that this scheme adds more
complexity than we wanted.

Example test case:

	mkdir /cgroup/hwpoison

	usemem -m 100 -s 1000 &
	echo `jobs -p` > /cgroup/hwpoison/tasks

	memcg_ino=$(ls -id /cgroup/hwpoison | cut -f1 -d' ')
	echo $memcg_ino > /debug/hwpoison/corrupt-filter-memcg

	page-types -p `pidof init`   --hwpoison  # shall do nothing
	page-types -p `pidof usemem` --hwpoison  # poison its pages

[AK: Fix documentation]
[Add fix for problem noticed by Li Zefan <lizf@cn.fujitsu.com>;
dentry in the css could be NULL]

CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Hugh Dickins <hugh.dickins@tiscali.co.uk>
CC: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
CC: Balbir Singh <balbir@linux.vnet.ibm.com>
CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Paul Menage <menage@google.com>
CC: Nick Piggin <npiggin@suse.de>
CC: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2009-12-16 12:19:59 +01:00
..
ABI Documentation: ABI: /sys/devices/system/cpu/cpu#/node 2009-12-15 08:53:18 -08:00
DocBook Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-12-09 19:52:01 -08:00
PCI PCI: document PCIe fundamental reset interfaces 2009-09-09 13:29:38 -07:00
RCU rcu: Add synchronize_srcu_expedited() to the documentation 2009-10-26 09:40:31 +01:00
accounting Documentation/: fix warnings from -Wmissing-prototypes in HOSTCFLAGS 2009-09-23 07:39:28 -07:00
acpi
aoe
arm OMAP: DSS2: Documentation for DSS2 2009-12-09 12:04:34 +02:00
auxdisplay includecheck fix: Documentation, cfag12864b-example.c 2009-09-24 07:20:57 -07:00
blackfin
block Trivial typo fixes in Documentation/block/data-integrity.txt. 2009-07-01 10:56:25 +02:00
blockdev The DRBD driver 2009-10-01 21:17:49 +02:00
cdrom debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. 2009-06-15 21:30:28 -07:00
cgroups blkio: Documentation 2009-12-03 19:28:53 +01:00
connector connector: Provide the sender's credentials to the callback 2009-10-02 10:54:01 -07:00
console
cpu-freq [ACPI/CPUFREQ] Introduce bios_limit per cpu cpufreq sysfs interface 2009-11-24 13:33:34 -05:00
cpuidle
cris
crypto async_tx: add support for asynchronous RAID6 recovery operations 2009-08-29 19:09:27 -07:00
development-process docs: Encourage better changelogs in the development process document 2009-06-04 10:32:49 -06:00
device-mapper dm snapshot: add merge target 2009-12-10 23:52:30 +00:00
driver-model driver model: fix show/store prototypes in doc. 2009-07-12 13:02:10 -07:00
dvb tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
early-userspace
fault-injection debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. 2009-06-15 21:30:28 -07:00
fb fbdev: Migrate mailing lists to vger 2009-11-30 13:46:04 -08:00
filesystems procfs: allow threads to rename siblings via /proc/pid/tasks/tid/comm 2009-12-15 08:53:24 -08:00
firmware_class driver core: fix documentation of request_firmware_nowait 2009-06-15 21:30:24 -07:00
frv
hwmon lis3: update documentation to match latest changes 2009-12-15 08:53:36 -08:00
i2c i2c: Get rid of struct i2c_client_address_data 2009-12-14 21:17:25 +01:00
i2o
ia64 Documentation/: fix warnings from -Wmissing-prototypes in HOSTCFLAGS 2009-09-23 07:39:28 -07:00
ide ide: preserve Host Protected Area by default (v2) 2009-06-07 13:52:52 +02:00
infiniband IB: Fix typo in udev rule documentation 2009-10-07 15:35:55 -07:00
input Input: add new driver for Sentelic Finger Sensing Pad 2009-08-19 21:46:09 -07:00
ioctl drivers/char/uv_mmtimer.c: add memory mapped RTC driver for UV 2009-09-24 07:21:03 -07:00
isdn gigaset: documentation amendments 2009-12-08 20:30:41 -08:00
ja_JP block: rename CONFIG_LBD to CONFIG_LBDAF 2009-06-19 08:08:50 +02:00
kbuild kbuild: introduce ld-option 2009-09-20 12:27:42 +02:00
kdump trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
ko_KR
kvm KVM: x86: Add KVM_GET/SET_VCPU_EVENTS 2009-12-03 09:32:25 +02:00
laptops Merge branch 'thinkpad-2.6.32-part2' into release 2009-09-26 01:08:55 -04:00
lguest tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
m68k
make
mips ide: remove unused CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ 2009-01-14 19:19:03 +01:00
misc-devices ad525x_dpot: new driver for AD525x digital potentiometers 2009-12-15 08:53:25 -08:00
mn10300 trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
mtd trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
namespaces
netlabel
networking ipv4 05/05: add sysctl to accept packets with local source addresses 2009-12-03 12:14:38 -08:00
parisc
pcmcia pcmcia: remove now-defunct cs_error, pcmcia_error_{func,ret} 2009-11-09 08:30:06 +01:00
power Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
powerpc Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-12-12 14:27:24 -08:00
pps LinuxPPS: core support 2009-06-18 13:04:04 -07:00
prctl
s390 [S390] s390dbf: Add description for usage of "%s" in sprintf events 2009-09-11 10:29:53 +02:00
scheduler sched: Documentation/sched-rt-group: Fix style issues & bump version 2009-06-21 13:12:46 +02:00
scsi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
serial tty: docs: serial/tty, add to ldisc methods 2009-12-11 15:18:05 -08:00
sh
sound Merge branch 'topic/hda' into for-linus 2009-12-09 18:16:11 +01:00
sparc
spi tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
sysctl doc: Add documentation for bootloader_{type,version} 2009-12-11 14:28:56 -08:00
telephony
thermal thermal: sysfs-api.txt - document passive attribute for thermal zones 2009-11-05 18:11:18 -05:00
timers fix URL in hpet.txt 2009-11-09 09:40:54 +01:00
trace Merge branch 'perf/core' into perf/probes 2009-11-17 10:17:47 +01:00
uml
usb USB: prepare for changover to Runtime PM framework 2009-12-11 11:55:25 -08:00
video4linux Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-12-09 19:50:49 -08:00
vm HWPOISON: add memory cgroup filter 2009-12-16 12:19:59 +01:00
w1 ds2482: Discard obsolete detect method 2009-10-04 22:53:41 +02:00
watchdog Documentation/: fix warnings from -Wmissing-prototypes in HOSTCFLAGS 2009-09-23 07:39:28 -07:00
wimax
x86 USB: ehci-dbgp,documentation: Documentation updates for ehci-dbgp 2009-09-23 06:46:39 -07:00
zh_CN
00-INDEX Bluetooth: Add documentation for Marvell Bluetooth driver 2009-08-22 14:25:32 -07:00
BUG-HUNTING
Changes Documentation/Changes: perl is needed to build the kernel 2009-06-18 13:03:46 -07:00
CodingStyle trivial: fix typo milisecond/millisecond for documentation and source comments. 2009-06-12 18:01:46 +02:00
DMA-API.txt trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
DMA-ISA-LPC.txt
DMA-attributes.txt
DMA-mapping.txt use DMA_BIT_MASK instead of inline constant 2009-12-09 18:59:52 -08:00
HOWTO
IO-mapping.txt Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
IPMI.txt
IRQ-affinity.txt
IRQ.txt
Intel-IOMMU.txt intel-iommu: Kill DMAR_BROKEN_GFX_WA option. 2009-09-19 09:37:23 -07:00
Makefile
ManagementStyle
SAK.txt
SELinux.txt
SM501.txt trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
SecurityBugs
Smack.txt smack: implement logging V3 2009-04-14 09:00:23 +10:00
SubmitChecklist block: rename CONFIG_LBD to CONFIG_LBDAF 2009-06-19 08:08:50 +02:00
SubmittingDrivers
SubmittingPatches docs: update patch size in SubmittingPatches 2009-10-01 16:11:12 -07:00
VGA-softcursor.txt
applying-patches.txt
atomic_ops.txt Documentation/atomic_ops.txt: fix sample code 2009-06-16 19:47:52 -07:00
bad_memory.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
bt8xxgpio.txt
btmrvl.txt Bluetooth: Add documentation for Marvell Bluetooth driver 2009-08-22 14:25:32 -07:00
cachetlb.txt
cpu-hotplug.txt powerpc/pseries: Add hooks to put the CPU into an appropriate offline state 2009-11-24 14:33:04 +11:00
cpu-load.txt
cputopology.txt Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files 2009-10-30 14:59:52 -07:00
credentials.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt ieee1394: update URLs in debugging-via-ohci1394.txt 2009-10-03 09:28:11 +02:00
dell_rbu.txt trivial: Documentation/dell_rbu.txt: fix typos 2009-06-12 18:01:50 +02:00
devices.txt lanana: assign a device name and numbering for MAX3100 2009-04-07 08:44:05 -07:00
dmaengine.txt
dontdiff SELinux: add .gitignore files for dynamic classes 2009-10-24 09:42:27 +08:00
dynamic-debug-howto.txt Dynamic debug: allow simple quoting of words 2009-03-24 16:38:27 -07:00
edac.txt fix typos/grammos in Documentation/edac.txt 2009-12-04 15:39:53 +01:00
eisa.txt
email-clients.txt
feature-removal-schedule.txt kallsyms: remove deprecated print_fn_descriptor_symbol() 2009-12-15 08:53:26 -08:00
flexible-arrays.txt Update flex_arrays.txt 2009-10-15 07:25:20 -06:00
futex-requeue-pi.txt futex: add requeue-pi documentation 2009-05-09 07:12:50 +02:00
gcov.txt trivial: fix typo in CONFIG_DEBUG_FS in gcov doc 2009-09-21 15:14:56 +02:00
gpio.txt correct gpio.txt typos 2009-12-09 18:59:52 -08:00
highuid.txt
hw_random.txt
initrd.txt
intel_txt.txt x86, intel_txt: Intel TXT boot support 2009-07-21 11:49:06 -07:00
io-mapping.txt
io_ordering.txt
iostats.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt kernel-doc: allow multi-line declaration purpose descriptions 2009-09-18 09:48:52 -07:00
kernel-docs.txt
kernel-parameters.txt Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2009-12-12 11:40:13 -08:00
keys-request-key.txt
keys.txt KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] 2009-09-02 21:29:22 +10:00
kmemcheck.txt kmemcheck: update documentation 2009-07-01 22:36:22 +02:00
kmemleak.txt kmemleak: add clear command support 2009-09-08 16:36:08 +01:00
kobject.txt trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
kprobes.txt debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. 2009-06-15 21:30:28 -07:00
kref.txt kref: double kref_put() in my_data_handler() 2009-09-18 09:48:52 -07:00
ldm.txt
leds-class.txt led: document sysfs interface 2009-08-28 15:21:12 -04:00
leds-lp3944.txt leds: LED driver for National Semiconductor LP3944 Funlight Chip 2009-06-23 20:21:38 +01:00
local_ops.txt trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
lockdep-design.txt lockdep: Fix typos in documentation 2009-08-07 12:03:46 +02:00
lockstat.txt lockstat: Add usage info to Documentation/lockstat.txt 2009-12-06 13:20:02 +01:00
logo.gif Revert "linux.conf.au 2009: Tuz" 2009-04-27 12:00:27 -07:00
logo.txt Revert "linux.conf.au 2009: Tuz" 2009-04-27 12:00:27 -07:00
magic-number.txt
mca.txt
md.txt md: add 'recovery_start' per-device sysfs attribute 2009-12-14 12:58:57 +11:00
memory-barriers.txt sched: Document memory barriers implied by sleep/wake-up primitives 2009-04-29 14:15:55 +02:00
memory-hotplug.txt mm: add numa node symlink for memory section in sysfs 2009-12-15 08:53:17 -08:00
memory.txt Documentation/memory.txt: remove some very outdated recommendations 2009-09-22 07:17:26 -07:00
mono.txt
mutex-design.txt
nmi_watchdog.txt
nommu-mmap.txt nommu: fix malloc performance by adding uninitialized flag 2009-12-15 08:53:24 -08:00
numastat.txt mm: fix NUMA accounting in numastat.txt 2009-09-22 07:17:39 -07:00
oops-tracing.txt docs: Describe the 'C' taint flag in oops-tracing.txt 2009-11-09 09:40:56 +01:00
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
printk-formats.txt
prio_tree.txt
rbtree.txt trivial: rbtree.txt: fix rb_entry() parameters in sample code 2009-06-12 18:01:47 +02:00
rfkill.txt rfkill: export persistent attribute in sysfs 2009-06-19 11:50:18 -04:00
robust-futex-ABI.txt futex: documentation: fix inconsistent description of futex list_op_pending 2009-06-18 13:03:56 -07:00
robust-futexes.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt rtc: add boot_timesource sysfs attribute 2009-09-23 07:39:46 -07:00
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
slow-work.txt SLOW_WORK: Move slow_work's proc file to debugfs 2009-12-01 08:20:31 -08:00
sparse.txt Documentation: explain the difference between __bitwise and __bitwise__ 2009-04-11 08:18:11 +02:00
spinlocks.txt Documentation: rw_lock lessons learned 2009-12-14 09:46:56 -08:00
stable_api_nonsense.txt
stable_kernel_rules.txt
svga.txt
sysfs-rules.txt Doc/sysfs-rules: Swap the order of the words so the sentence makes more sense 2009-05-08 19:22:20 -07:00
sysrq.txt sysrq, kdump: make sysrq-c consistent 2009-07-29 19:10:36 -07:00
tomoyo.txt tomoyo: add Documentation/tomoyo.txt 2009-04-14 09:14:58 +10:00
unaligned-memory-access.txt
unicode.txt
unshare.txt
vgaarbiter.txt PCI/VGA: add VGA arbitration documentation 2009-09-09 13:29:42 -07:00
video-output.txt
volatile-considered-harmful.txt
voyager.txt
zorro.txt