[dm-devel] [PATCH] dm-kcopyd: use __GFP_HIGHMEM when allocating the pages
Mikulas Patocka
mpatocka at redhat.com
Wed Jul 13 11:05:51 UTC 2022
dm-kcopyd doesn't access the allocated pages directly, it only passes them
to dm-io that adds them to the bio list - thus, we can allocate the pages
from high memory. This will reduce pressure on the low memory when there
are large number of kcopyd jobs in progress.
Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
Index: linux-2.6/drivers/md/dm-kcopyd.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-kcopyd.c
+++ linux-2.6/drivers/md/dm-kcopyd.c
@@ -219,7 +219,7 @@ static struct page_list *alloc_pl(gfp_t
if (!pl)
return NULL;
- pl->page = alloc_page(gfp);
+ pl->page = alloc_page(gfp | __GFP_HIGHMEM);
if (!pl->page) {
kfree(pl);
return NULL;
More information about the dm-devel
mailing list