mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 09:44:18 +08:00
facb6011f3
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> |
||
---|---|---|
.. | ||
debugfs-kmemtrace | ||
debugfs-pktcdvd | ||
ima_policy | ||
procfs-diskstats | ||
sysfs-block | ||
sysfs-bus-css | ||
sysfs-bus-pci | ||
sysfs-bus-pci-devices-cciss | ||
sysfs-bus-umc | ||
sysfs-bus-usb | ||
sysfs-bus-usb-devices-usbsevseg | ||
sysfs-c2port | ||
sysfs-class | ||
sysfs-class-bdi | ||
sysfs-class-lcd | ||
sysfs-class-led | ||
sysfs-class-mtd | ||
sysfs-class-pktcdvd | ||
sysfs-class-regulator | ||
sysfs-class-uwb_rc | ||
sysfs-class-uwb_rc-wusbhc | ||
sysfs-dev | ||
sysfs-devices | ||
sysfs-devices-memory | ||
sysfs-devices-system-cpu | ||
sysfs-firmware-acpi | ||
sysfs-firmware-memmap | ||
sysfs-firmware-sgi_uv | ||
sysfs-fs-ext4 | ||
sysfs-gpio | ||
sysfs-ibft | ||
sysfs-kernel-mm | ||
sysfs-kernel-mm-hugepages | ||
sysfs-kernel-slab | ||
sysfs-kernel-uids | ||
sysfs-memory-page-offline | ||
sysfs-ocfs2 | ||
sysfs-platform-asus-laptop | ||
sysfs-platform-eeepc-laptop | ||
sysfs-power | ||
sysfs-pps | ||
sysfs-profiling | ||
sysfs-wusb_cbaf |