From: Mikulas Patocka Date: Wed, 13 Jul 2022 11:05:51 +0000 (-0400) Subject: dm kcopyd: use __GFP_HIGHMEM when allocating pages X-Git-Tag: v6.0-rc1~177^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=949d49ec306dfca51d63d89bc316211a2a008cfc;p=thirdparty%2Flinux.git dm kcopyd: use __GFP_HIGHMEM when allocating pages 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 Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c index 37b03ab7e5c9e..6aa821a02d449 100644 --- a/drivers/md/dm-kcopyd.c +++ b/drivers/md/dm-kcopyd.c @@ -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;