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 <mpato...@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;
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel

Reply via email to