[Devel] [PATCH RH7] ploop: Reduce batch size in populate_holes_bitmap()

Kirill Tkhai ktkhai at virtuozzo.com
Wed Oct 28 18:59:34 MSK 2020


.sync_read_many->kaio_sync_io() allocates bvec for passed pages,
and high order warning fires.

kaio_sync_io() uses GFP_NOIO, so kvmalloc() will be useless. Thus,
we reduce batch size to fit order 2 in kaio_sync_io()->kmalloc().

https://jira.sw.ru/browse/PSBM-121839

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 99acad2d6994..4fad1ba5efeb 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -176,8 +176,8 @@ static int populate_holes_bitmap(struct ploop_delta *delta,
 		return 0;
 
 	ret = -ENOMEM;
-	/* Use multiplier 10 for bigger batch and better performance */
-	nr_all_pages = 10 * cluster_size_in_bytes(delta->plo) / PAGE_SIZE;
+	/* Use multiplier 4 for bigger batch and better performance */
+	nr_all_pages = 4 * cluster_size_in_bytes(delta->plo) / PAGE_SIZE;
 	pages = kvzalloc(sizeof(struct page *) * nr_all_pages, GFP_KERNEL);
 	if (!pages)
 		return ret;




More information about the Devel mailing list