From: Ma Wupeng mawupeng1@huawei.com
Page ejection is achieved by soft_offline_page and unpoison_memory. A linked list is maintained to log the pfns which are offlined by this module. Only the pfns present in the list is allowed to go online.
The follow sysfs is introduced to online/offline page via this module, since there is a internal linked list to record all offlined pages, remove_page is introduce to remove this page from list.
- /sys/kernel/page_eject/online_page - /sys/kernel/page_eject/offline_page - /sys/kernel/page_eject/remove_page
Changelog since v1: - move page_eject.c to drivers/ras/hisilicon
Ma Wupeng (4): mm/hwpoison: Export symbol soft_offline_page mm/memory-failure: introduce soft_online_page mm: page_eject: Introuduce page ejection config: update defconfig for PAGE_EJECT
arch/arm64/configs/openeuler_defconfig | 1 + drivers/ras/Kconfig | 1 + drivers/ras/Makefile | 2 + drivers/ras/hisilicon/Kconfig | 10 + drivers/ras/hisilicon/Makefile | 2 + drivers/ras/hisilicon/page_eject.c | 249 +++++++++++++++++++++++++ include/linux/mm.h | 1 + mm/memory-failure.c | 55 ++++-- 8 files changed, 307 insertions(+), 14 deletions(-) create mode 100644 drivers/ras/hisilicon/Kconfig create mode 100644 drivers/ras/hisilicon/Makefile create mode 100644 drivers/ras/hisilicon/page_eject.c