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:
avg 2010-07-23 17:44:01 +00:00
parent 92f99daeff
commit 4663240679

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;