Whamcloud - gitweb
EX-8245 ptlrpc: always do vmalloc
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 28 Sep 2023 00:09:03 +0000 (20:09 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 2 Oct 2023 01:00:55 +0000 (01:00 +0000)
If we were ever to do an allocation with kmalloc, we could
get non-page aligned memory.  So just use vmalloc directly.

Sadly, this isn't the problem with infiniband.  We never
ask for < 8192, which is the libcfs kmalloc/vmalloc cutoff.

Still, this is a timebomb if we ever changed the libcfs
kmalloc/vmalloc cutoff, so, fix it.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Id20898065b516d363d9dc280e71be1b5cfb6f4a7
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52532
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ptlrpc/sec_bulk.c

index a413cab..9ec2d56 100644 (file)
@@ -557,7 +557,7 @@ static int pool_add_pages(int npages, struct ptlrpc_page_pool *page_pool)
                                ptr_pages[i][j] = alloc_page(GFP_NOFS |
                                        __GFP_HIGHMEM);
                        else {
-                               OBD_ALLOC_LARGE(ptr_pages[i][j],
+                               OBD_VMALLOC(ptr_pages[i][j],
                                        element_size(page_pool));
                        }
                        if (ptr_pages[i][j] == NULL)