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

Vasily Averin vvs at virtuozzo.com
Thu Oct 29 16:56:57 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.41
------>
commit c8d87f9b868d0b1017e97b769a37861afc305062
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Oct 29 16:56:57 2020 +0300

    ploop: Reduce batch size in populate_holes_bitmap()
    
    .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 99acad2..4fad1ba 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