Ok, this is v2. I left out the MF_COUNT_INCREASED changes as we need to have the pages pinned when coming from madvise, otherwise we might be messing with a page which belongs to someone else. I ran several tests [1] [2] to make sure nothing is broken. @Andrew: Please, remove [3] from mmotm and linux-next and replace it with this one. Thanks [1] https://github.com/Naoya-Horiguchi/mm_regression [2] https://e.coding.net/cailca/linux/mm [3] https://patchwork.kernel.org/project/linux-mm/cover/20201119105716.5962-1-osalvador@xxxxxxx/ V1 -> V2: - Adressed feedback from Vlastimil - Add Acked-by from Vlastimil Oscar Salvador (3): mm,hwpoison: Refactor get_any_page mm,hwpoison: Disable pcplists before grabbing a refcount mm,hwpoison: Remove drain_all_pages from shake_page mm/memory-failure.c | 168 +++++++++++++++++++------------------------- 1 file changed, 74 insertions(+), 94 deletions(-) -- 2.26.2