mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Reduce max kmem based slab size
Allowing MAX_ORDER-1 sized allocations for kmem based slabs have been observed to result in deadlocks. To help prvent this limit max kmem based slab size to MAX_ORDER-3. Just for the record callers should not be creating slabs like this, but if they do we should still handle it as safely as we can.
This commit is contained in:
parent
c5c3d402f7
commit
aa600d8a38
@ -1057,7 +1057,7 @@ spl_slab_size(spl_kmem_cache_t *skc, uint32_t *objs, uint32_t *size)
|
||||
obj_size = spl_obj_size(skc);
|
||||
|
||||
if (skc->skc_flags & KMC_KMEM)
|
||||
max_size = ((uint32_t)1 << (MAX_ORDER-1)) * PAGE_SIZE;
|
||||
max_size = ((uint32_t)1 << (MAX_ORDER-3)) * PAGE_SIZE;
|
||||
else
|
||||
max_size = (32 * 1024 * 1024);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user