diff options
author | 2024-10-09 14:00:48 -0700 | |
---|---|---|
committer | 2024-10-11 14:07:33 -0300 | |
commit | 4d784c042d164f10fc809e2338457036cd7c653d (patch) | |
tree | be0e80bb9ece4e2abb2d4732e00734d5e98e9a82 /rust/helpers/workqueue.c | |
parent | RDMA/irdma: Fix misspelling of "accept*" (diff) | |
download | wireguard-linux-4d784c042d164f10fc809e2338457036cd7c653d.tar.xz wireguard-linux-4d784c042d164f10fc809e2338457036cd7c653d.zip |
RDMA/srpt: Make slab cache names unique
Since commit 4c39529663b9 ("slab: Warn on duplicate cache names when
DEBUG_VM=y"), slab complains about duplicate cache names. Hence this
patch. The approach is as follows:
- Maintain an xarray with the slab size as index and a reference count
and a kmem_cache pointer as contents. Use srpt-${slab_size} as kmem
cache name.
- Use 512-byte alignment for all slabs instead of only for some of the
slabs.
- Increment the reference count instead of calling kmem_cache_create().
- Decrement the reference count instead of calling kmem_cache_destroy().
Fixes: 5dabcd0456d7 ("RDMA/srpt: Add support for immediate data")
Link: https://patch.msgid.link/r/20241009210048.4122518-1-bvanassche@acm.org
Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Closes: https://lore.kernel.org/linux-block/xpe6bea7rakpyoyfvspvin2dsozjmjtjktpph7rep3h25tv7fb@ooz4cu5z6bq6/
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions