diff options
| author | Israel Rukshin <israelr@nvidia.com> | 2025-11-24 08:49:21 +0200 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2025-12-04 14:46:16 -0800 |
| commit | 5c8d134f01556affce430a25e1551d78d45ebc9d (patch) | |
| tree | dfab7b5e9d37252511973bba9f3b243f02871a37 /rust/helpers/helpers.c | |
| parent | ce234d838d3b0566bcbf3fd13b546f176564ca07 (diff) | |
nvmet-tcp: use kvcalloc for commands array
Replace kcalloc with kvcalloc for allocation of the commands
array. Each command structure is 712 bytes. The array typically
exceeds a single page, and grows much larger with high queue depths
(e.g., commands >182KB).
kvcalloc automatically falls back to vmalloc for large or fragmented
allocations, improving reliability. In our case, this memory is not
aimed for DMA operations and could be safely allocated by kvcalloc.
Using virtually contiguous memory helps to avoid allocation failures
and out-of-memory conditions common with kcalloc on large pools.
Signed-off-by: Israel Rukshin <israelr@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
