mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 18:31:00 +03:00
d4e04cc145
When growing the size of a (VMEM or KVMEM) kmem cache, spl_cache_grow() always does taskq_dispatch(spl_cache_grow_work), and then waits for the KMC_BIT_GROWING to be cleared by the taskq thread. The taskq thread (spl_cache_grow_work()) does: 1. allocate new slab and add to list 2. wake_up_all(skc_waitq) 3. clear_bit(KMC_BIT_GROWING) Therefore, the waiting thread can wake up before GROWING has been cleared. It will see that the growing has not yet completed, and go back to sleep until it hits the 100ms timeout. This can have an extreme performance impact on workloads that alloc/free more than fits in the (statically-sized) magazines. These workloads allocate and free slabs with high frequency. The problem can be observed with `funclatency spl_cache_grow`, which on some workloads shows that 99.5% of the time it takes <64us to allocate slabs, but we spend ~70% of our time in outliers, waiting for the 100ms timeout. The fix is to do `clear_bit(KMC_BIT_GROWING)` before `wake_up_all(skc_waitq)`. A future investigation should evaluate if we still actually need to taskq_dispatch() at all, and if so on which kernel versions. Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Wilson <gwilson@delphix.com> Signed-off-by: Matthew Ahrens <mahrens@delphix.com> Closes #9989 |
||
---|---|---|
.. | ||
Makefile.in | ||
README.md | ||
spl-atomic.c | ||
spl-condvar.c | ||
spl-cred.c | ||
spl-err.c | ||
spl-generic.c | ||
spl-kmem-cache.c | ||
spl-kmem.c | ||
spl-kobj.c | ||
spl-kstat.c | ||
spl-proc.c | ||
spl-procfs-list.c | ||
spl-taskq.c | ||
spl-thread.c | ||
spl-tsd.c | ||
spl-vmem.c | ||
spl-vnode.c | ||
spl-xdr.c | ||
spl-zlib.c | ||
THIRDPARTYLICENSE.gplv2 | ||
THIRDPARTYLICENSE.gplv2.descrip |
The Solaris Porting Layer, SPL, is a Linux kernel module which provides a compatibility layer used by the ZFS on Linux project.
Installation
The latest version of the SPL is maintained as part of this repository. Only when building ZFS version 0.7.x or earlier must an external SPL release be used. These releases can be found at:
- Version 0.7.x: https://github.com/zfsonlinux/spl/tree/spl-0.7-release
- Version 0.6.5.x: https://github.com/zfsonlinux/spl/tree/spl-0.6.5-release
Release
The SPL is released under a GPLv2 license.
For more details see the NOTICE and THIRDPARTYLICENSE files; UCRL-CODE-235197