diff options
author | Bart Van Assche <[email protected]> | 2024-10-09 14:00:48 -0700 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2024-10-11 14:07:33 -0300 |
commit | 4d784c042d164f10fc809e2338457036cd7c653d (patch) | |
tree | be0e80bb9ece4e2abb2d4732e00734d5e98e9a82 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | 8cddfa535c931b8d8110c73bfed7354a94cbf891 (diff) |
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/[email protected]
Reported-by: Shinichiro Kawasaki <[email protected]>
Closes: https://lore.kernel.org/linux-block/xpe6bea7rakpyoyfvspvin2dsozjmjtjktpph7rep3h25tv7fb@ooz4cu5z6bq6/
Suggested-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Tested-by: Shin'ichiro Kawasaki <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions