zfs arc_memory_throttle: available memory is free + cache

OpenSolaris freemem has the same meaning as our v_free_count +
v_cache_count.

Obtained from:	Artem Belevich <fbsdlist@src.cx>,
		Peter Jeremy <peterjeremy@acm.org>
Discussed with:	pjd
MFC after:	2 weeks
This commit is contained in:
Andriy Gapon 2010-07-23 17:44:01 +00:00
parent e9a6792326
commit a85d8d8acc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210427

View File

@ -3653,7 +3653,8 @@ static int
arc_memory_throttle(uint64_t reserve, uint64_t inflight_data, uint64_t txg)
{
#ifdef _KERNEL
uint64_t available_memory = ptoa((uintmax_t)cnt.v_free_count);
uint64_t available_memory = ptoa((uintmax_t)cnt.v_free_count
+ cnt.v_cache_count);
static uint64_t page_load = 0;
static uint64_t last_txg = 0;