linux/drivers/base
Andi Kleen facb6011f3 HWPOISON: Add soft page offline support
This is a simpler, gentler variant of memory_failure() for soft page
offlining controlled from user space.  It doesn't kill anything, just
tries to invalidate and if that doesn't work migrate the
page away.

This is useful for predictive failure analysis, where a page has
a high rate of corrected errors, but hasn't gone bad yet. Instead
it can be offlined early and avoided.

The offlining is controlled from sysfs, including a new generic
entry point for hard page offlining for symmetry too.

We use the page isolate facility to prevent re-allocation
race. Normally this is only used by memory hotplug. To avoid
races with memory allocation I am using lock_system_sleep().
This avoids the situation where memory hotplug is about
to isolate a page range and then hwpoison undoes that work.
This is a big hammer currently, but the simplest solution
currently.

When the page is not free or LRU we try to free pages
from slab and other caches. The slab freeing is currently
quite dumb and does not try to focus on the specific slab
cache which might own the page. This could be potentially
improved later.

Thanks to Fengguang Wu and Haicheng Li for some fixes.

[Added fix from Andrew Morton to adapt to new migrate_pages prototype]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2009-12-16 12:20:00 +01:00
..
power PM / Runtime: Remove unnecessary braces in __pm_runtime_set_status() 2009-12-06 16:17:57 +01:00
attribute_container.c driver core: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:31 -08:00
base.h Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev 2009-09-15 09:50:49 -07:00
bus.c Driver core: allow certain drivers prohibit bind/unbind via sysfs 2009-10-30 14:59:51 -07:00
class.c Driver core: Add support for compatibility classes 2009-09-15 09:50:48 -07:00
core.c Driver core: fix race in dev_driver_string 2009-12-11 11:24:55 -08:00
cpu.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-12-14 09:58:24 -08:00
dd.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
devres.c devres: WARN() and return, don't crash on device_del() of uninitialized device 2009-07-12 13:02:09 -07:00
devtmpfs.c Driver-Core: devtmpfs - set root directory mode to 0755 2009-12-11 11:24:52 -08:00
dma-coherent.c driver-core: move dma-coherent.c from kernel to driver/base 2009-09-15 09:50:47 -07:00
dma-mapping.c devres: device resource management 2007-02-09 17:39:36 -05:00
driver.c Driver core: fix driver_register() return value 2009-10-30 14:59:51 -07:00
firmware_class.c firmware_class: make request_firmware_nowait more useful 2009-12-11 11:24:52 -08:00
firmware.c firmware: change firmware_kset to firmware_kobj 2008-01-24 20:40:23 -08:00
hypervisor.c kobject: convert /sys/hypervisor to use kobject_create 2008-01-24 20:40:15 -08:00
init.c Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev 2009-09-15 09:50:49 -07:00
iommu.c drivers/base/iommu.c: add missing includes 2009-05-06 16:36:10 -07:00
isa.c dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
Kconfig Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev 2009-09-15 09:50:49 -07:00
Makefile Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev 2009-09-15 09:50:49 -07:00
map.c [PATCH] kobj_map semaphore to mutex conversion 2006-03-20 13:42:58 -08:00
memory.c HWPOISON: Add soft page offline support 2009-12-16 12:20:00 +01:00
module.c Driver core: move the static kobject out of struct driver 2008-01-24 20:40:35 -08:00
node.c mm: slab-allocate memory section nodemask for large systems 2009-12-15 08:53:20 -08:00
platform.c Driver Core: Early platform driver buffer 2009-12-11 11:24:55 -08:00
sys.c driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails 2009-07-28 13:45:22 -07:00
topology.c cpumask: Use topology_core_cpumask()/topology_thread_cpumask() 2009-01-11 19:12:49 +01:00
transport_class.c SCSI: convert struct class_device to struct device 2008-04-19 19:10:33 -07:00