1
0
Fork 0

mm, madvise_inject_error: Disable MADV_SOFT_OFFLINE for ZONE_DEVICE pages

Given that dax / device-mapped pages are never subject to page
allocations remove them from consideration by the soft-offline
mechanism.

Reported-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
hifive-unleashed-5.1
Dan Williams 2018-07-13 21:49:56 -07:00 committed by Dave Jiang
parent 73449daf8f
commit 86a66810ba
1 changed files with 8 additions and 0 deletions

View File

@ -1751,6 +1751,14 @@ int soft_offline_page(struct page *page, int flags)
int ret;
unsigned long pfn = page_to_pfn(page);
if (is_zone_device_page(page)) {
pr_debug_ratelimited("soft_offline: %#lx page is device page\n",
pfn);
if (flags & MF_COUNT_INCREASED)
put_page(page);
return -EIO;
}
if (PageHWPoison(page)) {
pr_info("soft offline: %#lx page already poisoned\n", pfn);
if (flags & MF_COUNT_INCREASED)