The patch titled Subject: mm/page_idle.c: Skip offline pages has been added to the -mm tree. Its filename is mm-page_idlec-skip-offline-pages.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-page_idlec-skip-offline-pages.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-page_idlec-skip-offline-pages.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: SeongJae Park <sjpark@xxxxxxxxx> Subject: mm/page_idle.c: Skip offline pages 'Idle page tracking' users can pass random pfn that might be mapped to an offline page. To avoid accessing such pages, this commit modifies the 'page_idle_get_page()' to use 'pfn_to_online_page()' instead of 'pfn_valid()' and 'pfn_to_page()' combination, so that the pfn mapped to an offline page can be skipped. Link: http://lkml.kernel.org/r/20200605092502.18018-2-sjpark@xxxxxxxxxx Signed-off-by: SeongJae Park <sjpark@xxxxxxxxx> Reported-by: David Hildenbrand <david@xxxxxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_idle.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/mm/page_idle.c~mm-page_idlec-skip-offline-pages +++ a/mm/page_idle.c @@ -4,6 +4,7 @@ #include <linux/fs.h> #include <linux/sysfs.h> #include <linux/kobject.h> +#include <linux/memory_hotplug.h> #include <linux/mm.h> #include <linux/mmzone.h> #include <linux/pagemap.h> @@ -30,13 +31,9 @@ */ static struct page *page_idle_get_page(unsigned long pfn) { - struct page *page; + struct page *page = pfn_to_online_page(pfn); pg_data_t *pgdat; - if (!pfn_valid(pfn)) - return NULL; - - page = pfn_to_page(pfn); if (!page || !PageLRU(page) || !get_page_unless_zero(page)) return NULL; _ Patches currently in -mm which might be from sjpark@xxxxxxxxx are scripts-spelling-add-a-few-more-typos.patch mm-page_idlec-skip-offline-pages.patch mm-page_idlec-skip-offline-pages.patch