-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make spl_kmem_cache size check consistent #15757
Conversation
On Linux x86_64, kmem cache can have size up to 4M, however increasing spl_kmem_cache_slab_limit can lead to crash due to the size check inconsitency. Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Just FYI - I've done stress testing with the limit raised to 2M, no issue has been observed, but I didn't get a chance to do performance testing. One caveat - in crash kernel mode, zfs crashes as it fails to create ddt_cache of size 24840. This is most likely a bug in Linux slub allocator which only happens in that mode (single cpu core?) and I will dig deeper when time permits. Anyway, this change does no harm. |
On Linux x86_64, kmem cache can have size up to 4M, however increasing spl_kmem_cache_slab_limit can lead to crash due to the size check inconsistency. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes openzfs#15757
On Linux x86_64, kmem cache can have size up to 4M, however increasing spl_kmem_cache_slab_limit can lead to crash due to the size check inconsistency. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes #15757
On Linux x86_64, kmem cache can have size up to 4M, however increasing spl_kmem_cache_slab_limit can lead to crash due to the size check inconsistency. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes openzfs#15757
On Linux x86_64, kmem cache can have size up to 4M, however increasing spl_kmem_cache_slab_limit can lead to crash due to the size check inconsistency. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes openzfs#15757
Define spl_kmem_cache_slab_limit to be SPL_MAX_KMEM_ORDER_NR_PAGES * PAGE_SIZE (16K on x86_64).
Motivation and Context
On Linux x86_64, kmem cache can have size up to 4M, however increasing spl_kmem_cache_slab_limit can lead to crash due to the size check inconsitency.
Description
How Has This Been Tested?
Built and tested on a VM in-house.
Types of changes
Checklist:
Signed-off-by
.