mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Allow the VM to provide backpressure on the ARC cache as it does
on Solaris.
This commit is contained in:
parent
62fa227ccd
commit
77d0162c70
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191902
@ -131,6 +131,8 @@
|
||||
#include <sys/kstat.h>
|
||||
#include <sys/sdt.h>
|
||||
|
||||
#include <vm/vm_pageout.h>
|
||||
|
||||
static kmutex_t arc_reclaim_thr_lock;
|
||||
static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */
|
||||
static uint8_t arc_thread_exit;
|
||||
@ -1809,6 +1811,13 @@ arc_reclaim_needed(void)
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* If pages are needed or we're within 2048 pages
|
||||
* of needing to page need to reclaim
|
||||
*/
|
||||
if (vm_pages_needed || (vm_paging_target() > -2048))
|
||||
return (1);
|
||||
|
||||
if (needfree)
|
||||
return (1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user