freebsd-nq/module/spl
Brian Behlendorf 376dc35e22 Add spl_kmem_cache_reclaim module option
The correct behavior for all registered shrinkers is to return the
number of objects in their cache.  In theory this allows the Linux
VM to balance memory reclaim across all registered caches.

In commit b9b3715 this behavior was disabled in favor of returning
-1 which notifies the VM that no additional objects are available
for reclaim.  This was done as a workaround to resolve thrashing
in shrink_slabs() which could occur when memory was low and numerous
core where in reclaim.  Unfortunately, this has been observed to
increase the likelihood of OOM events when SPL slab consumers are
responsible for consuming the majority of memory.

Therefore, this patch makes this behavior tunable.  Setting the
spl_kmem_cache_reclaim module option to 0x1 will result in the
shrinker only being called once.  This is the default behavior.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Closes #358
2014-05-22 10:30:12 -07:00
..
Makefile.in Add script for builtin module building. 2012-07-26 15:13:09 -07:00
spl-atomic.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-condvar.c Linux 3.13 compat: Remove unused flags variable from __cv_init() 2013-12-02 10:11:19 -08:00
spl-cred.c splat cred:groupmember: Fix false positives 2014-04-08 12:44:41 -07:00
spl-debug.c Support post-3.13 kthread_create() semantics. 2014-04-08 12:44:42 -07:00
spl-err.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-generic.c Simplify hostid logic 2014-04-14 09:04:41 -07:00
spl-kmem.c Add spl_kmem_cache_reclaim module option 2014-05-22 10:30:12 -07:00
spl-kobj.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-kstat.c 3537 add kstat_waitq_enter and friends 2013-10-25 13:41:52 -07:00
spl-mutex.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-proc.c Add KMC_SLAB cache type 2014-05-22 10:28:01 -07:00
spl-rwlock.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-taskq.c Evenly distribute the taskq threads across available CPUs 2014-04-25 15:29:18 -07:00
spl-thread.c Call kthread_create() correctly with fixed arguments. 2014-04-11 09:41:40 -07:00
spl-time.c Replace current_kernel_time() with getnstimeofday() 2013-10-09 13:28:30 -07:00
spl-tsd.c Linux 3.9 compat: Switch to hlist_for_each{,_rcu} 2013-03-14 10:43:34 -07:00
spl-vnode.c Linux 3.15: vfs_rename() added a flags argument 2014-05-07 13:38:17 -07:00
spl-xdr.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-zlib.c Refresh links to web site 2013-03-04 19:09:34 -08:00