mirror_zfs/module/spl
Brad Lewis 3ec34e5527 OpenZFS 9284 - arc_reclaim_thread has 2 jobs
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
2018-12-26 13:22:28 -08:00
..
Makefile.in Fixes for procfs files backed by linked lists 2018-09-26 11:08:12 -07:00
README.md Update build system and packaging 2018-05-29 16:00:33 -07:00
spl-atomic.c Fix cstyle warnings 2018-02-07 11:49:38 -08:00
spl-condvar.c Update build system and packaging 2018-05-29 16:00:33 -07:00
spl-cred.c Fix cstyle warnings 2018-02-07 11:49:38 -08:00
spl-err.c Update build system and packaging 2018-05-29 16:00:33 -07:00
spl-generic.c Create /proc/sys/kernel/spl/gitrev with git hash 2018-10-08 21:57:02 -07:00
spl-kmem-cache.c OpenZFS 9284 - arc_reclaim_thread has 2 jobs 2018-12-26 13:22:28 -08:00
spl-kmem.c Update build system and packaging 2018-05-29 16:00:33 -07:00
spl-kobj.c Fix cstyle warnings 2018-02-07 11:49:38 -08:00
spl-kstat.c Seeing negative values for wlentime and rlentime 2018-12-11 13:56:54 -08:00
spl-mutex.c Fix cstyle warnings 2018-02-07 11:49:38 -08:00
spl-proc.c Create /proc/sys/kernel/spl/gitrev with git hash 2018-10-08 21:57:02 -07:00
spl-procfs-list.c Fixes for procfs files backed by linked lists 2018-09-26 11:08:12 -07:00
spl-rwlock.c Add rwsem_tryupgrade for 4.9.20-rt16 kernel 2018-07-30 09:22:30 -07:00
spl-taskq.c Update build system and packaging 2018-05-29 16:00:33 -07:00
spl-thread.c Fix more cstyle warnings 2018-02-24 10:05:37 -08:00
spl-tsd.c Remove all spin_is_locked calls 2017-10-30 11:16:56 -07:00
spl-vmem.c Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
spl-vnode.c Add rwsem_tryupgrade for 4.9.20-rt16 kernel 2018-07-30 09:22:30 -07:00
spl-xdr.c Update build system and packaging 2018-05-29 16:00:33 -07:00
spl-zlib.c Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
THIRDPARTYLICENSE.gplv2 Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
THIRDPARTYLICENSE.gplv2.descrip Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00

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:

Release

The SPL is released under a GPLv2 license.
For more details see the NOTICE and THIRDPARTYLICENSE files; UCRL-CODE-235197