]> git.baikalelectronics.ru Git - kernel.git/commitdiff
dm kcopyd: use __GFP_HIGHMEM when allocating pages
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 13 Jul 2022 11:05:51 +0000 (07:05 -0400)
committerMike Snitzer <snitzer@kernel.org>
Thu, 14 Jul 2022 19:52:31 +0000 (15:52 -0400)
dm-kcopyd doesn't access the allocated pages directly, it only passes
them to dm-io which adds them to a bio list - thus, we can allocate
the pages from high memory. This will reduce pressure on the low
memory when there are a large number of kcopyd jobs in progress.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-kcopyd.c

index 37b03ab7e5c9e6df7eadf762af8dbcadb260d114..6aa821a02d4491c13b3f0a1bc2ee047ca9d97517 100644 (file)
@@ -219,7 +219,7 @@ static struct page_list *alloc_pl(gfp_t gfp)
        if (!pl)
                return NULL;
 
-       pl->page = alloc_page(gfp);
+       pl->page = alloc_page(gfp | __GFP_HIGHMEM);
        if (!pl->page) {
                kfree(pl);
                return NULL;