diff options
author | Dan Williams <dan.j.williams@intel.com> | 2018-07-13 21:49:56 -0700 |
---|---|---|
committer | Dave Jiang <dave.jiang@intel.com> | 2018-07-20 11:21:53 -0700 |
commit | 86a66810baa87e5d1c93a51f71d36c7f71fe3113 (patch) | |
tree | 7bf2be04372c4d89700da9adebc2a6e7f85fe5f2 /mm | |
parent | 73449daf8f0db2697fb9f3f60b3a6d5c76a3c5fc (diff) |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory-failure.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 9d142b9b86dc..988f977db3d2 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -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) |