OST_BUFSIZE is defined as 17 KiB. Lustre uses
OBD_CPT_ALLOC_LARGE() to allocate buffers, which,
in turn, uses kmalloc_node(). kmalloc_node(8192+) falls
back to the traditional buddy allocator kmalloc_large_node().
In the end, 32 KiB is allocated using a 17 KiB allocation
request.
This patch changes OST_BUFSIZE to 32 KiB so we can
effectively use the whole allocated buffer.
Change-Id: I93ce5b26eff4a6a1a17b2a9bfb83161528570197
Signed-off-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Cray-bug-id: LUS-6657
Reviewed-on: https://review.whamcloud.com/34127
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
#define OST_NBUFS 64
/** OST_BUFSIZE = max_reqsize + max sptlrpc payload size */
-#define OST_BUFSIZE max_t(int, OST_MAXREQSIZE + 1024, 16 * 1024)
+#define OST_BUFSIZE max_t(int, OST_MAXREQSIZE + 1024, 32 * 1024)
/**
* OST_IO_MAXREQSIZE is 18K, giving extra 46K can increase buffer utilization
* rate of request buffer, please check comment of MDS_LOV_BUFSIZE for details.
service->srv_rep_portal = conf->psc_buf.bc_rep_portal;
service->srv_req_portal = conf->psc_buf.bc_req_portal;
+ /* With slab/alloc_pages buffer size will be rounded up to 2^n */
+ if (service->srv_buf_size & (service->srv_buf_size - 1)) {
+ int round = size_roundup_power2(service->srv_buf_size);
+ service->srv_buf_size = round;
+ }
+
/* Increase max reply size to next power of two */
service->srv_max_reply_size = 1;
while (service->srv_max_reply_size <