mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-30 21:09:38 +03:00
3ec34e5527
Following the fix for 9018 (Replace kmem_cache_reap_now() with kmem_cache_reap_soon), the arc_reclaim_thread() no longer blocks while reaping. However, the code is still confusing and error-prone, because this thread has two responsibilities. We should instead separate this into two threads each with their own responsibility: 1. keep `arc_size` under `arc_c`, by calling `arc_adjust()`, which improves `arc_is_overflowing()` 2. keep enough free memory in the system, by calling `arc_kmem_reap_now()` plus `arc_shrink()`, which improves `arc_available_memory()`. Furthermore, we can use the zthr infrastructure to separate the "should we do something" from "do it" parts of the logic, and normalize the start up / shut down of the threads. Authored by: Brad Lewis <brad.lewis@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: Tim Kordas <tim.kordas@joyent.com> Reviewed by: Tim Chase <tim@chase2k.com> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: Brad Lewis <brad.lewis@delphix.com> Signed-off-by: Brad Lewis <brad.lewis@delphix.com> OpenZFS-issue: https://www.illumos.org/issues/9284 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/de753e34f9 Closes #8165 |
||
---|---|---|
.. | ||
acl.h | ||
atomic.h | ||
byteorder.h | ||
callb.h | ||
callo.h | ||
cmn_err.h | ||
condvar.h | ||
console.h | ||
cred.h | ||
ctype.h | ||
debug.h | ||
disp.h | ||
dkio.h | ||
dkioc_free_util.h | ||
errno.h | ||
fcntl.h | ||
file.h | ||
inttypes.h | ||
isa_defs.h | ||
kmem_cache.h | ||
kmem.h | ||
kobj.h | ||
kstat.h | ||
list.h | ||
Makefile.am | ||
mode.h | ||
mutex.h | ||
param.h | ||
proc.h | ||
processor.h | ||
procfs_list.h | ||
random.h | ||
rwlock.h | ||
shrinker.h | ||
sid.h | ||
signal.h | ||
stat.h | ||
strings.h | ||
sunddi.h | ||
sysmacros.h | ||
systeminfo.h | ||
taskq.h | ||
thread.h | ||
time.h | ||
timer.h | ||
tsd.h | ||
types32.h | ||
types.h | ||
uio.h | ||
user.h | ||
vfs.h | ||
vmem.h | ||
vmsystm.h | ||
vnode.h | ||
wait.h | ||
zmod.h | ||
zone.h |