The patch titled Subject: drivers: virtio_mem: use pageblock size as the minimum virtio_mem size. has been added to the -mm tree. Its filename is drivers-virtio_mem-use-pageblock-size-as-the-minimum-virtio_mem-size.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/drivers-virtio_mem-use-pageblock-size-as-the-minimum-virtio_mem-size.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/drivers-virtio_mem-use-pageblock-size-as-the-minimum-virtio_mem-size.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: Zi Yan <ziy@xxxxxxxxxx> Subject: drivers: virtio_mem: use pageblock size as the minimum virtio_mem size. alloc_contig_range() now only needs to be aligned to pageblock_nr_pages, drop virtio_mem size requirement that it needs to be MAX_ORDER_NR_PAGES. Link: https://lkml.kernel.org/r/20220425143118.2850746-7-zi.yan@xxxxxxxx Signed-off-by: Zi Yan <ziy@xxxxxxxxxx> Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Eric Ren <renzhengeek@xxxxxxxxx> Cc: kernel test robot <lkp@xxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Mike Rapoport <rppt@xxxxxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Oscar Salvador <osalvador@xxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/virtio/virtio_mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/virtio/virtio_mem.c~drivers-virtio_mem-use-pageblock-size-as-the-minimum-virtio_mem-size +++ a/drivers/virtio/virtio_mem.c @@ -2476,10 +2476,10 @@ static int virtio_mem_init_hotplug(struc VIRTIO_MEM_DEFAULT_OFFLINE_THRESHOLD); /* - * TODO: once alloc_contig_range() works reliably with pageblock - * granularity on ZONE_NORMAL, use pageblock_nr_pages instead. + * alloc_contig_range() works reliably with pageblock + * granularity on ZONE_NORMAL, use pageblock_nr_pages. */ - sb_size = PAGE_SIZE * MAX_ORDER_NR_PAGES; + sb_size = PAGE_SIZE * pageblock_nr_pages; sb_size = max_t(uint64_t, vm->device_block_size, sb_size); if (sb_size < memory_block_size_bytes() && !force_bbm) { _ Patches currently in -mm which might be from ziy@xxxxxxxxxx are mm-page_alloc-simplify-pageblock-migratetype-check-in-__free_one_page.patch mm-wrap-__find_buddy_pfn-with-a-necessary-buddy-page-validation.patch mm-wrap-__find_buddy_pfn-with-a-necessary-buddy-page-validation-v4.patch mm-page_isolation-move-has_unmovable_pages-to-mm-page_isolationc.patch mm-page_isolation-check-specified-range-for-unmovable-pages.patch mm-make-alloc_contig_range-work-at-pageblock-granularity.patch mm-page_isolation-enable-arbitrary-range-page-isolation.patch mm-cma-use-pageblock_order-as-the-single-alignment.patch drivers-virtio_mem-use-pageblock-size-as-the-minimum-virtio_mem-size.patch