Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2015 09:18:57 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        Shane Ambler <FreeBSD@ShaneWare.Biz>,  FreeBSD stable <freebsd-stable@FreeBSD.org>
Subject:   Re: Question about sysctl's
Message-ID:  <54B67AD1.5050609@FreeBSD.org>
In-Reply-To: <54B51FA0.6040307@ShaneWare.Biz>
References:  <54B51FA0.6040307@ShaneWare.Biz>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/13/15 8:37 AM, Shane Ambler wrote:
> 
> I am curious about two particular sysctl's, they are described as
> 
> vm.stats.vm.v_wire_count: Wired pages
> vm.max_wired: System-wide limit to wired page count
> 
> Now to me that sounds like v_wire_count should never get higher than
> max_wired, yet today I have a v_wire_count that is ~40% above the
> max_wired.
> 
> vm.stats.vm.v_wire_count: 938417
> vm.max_wired: 662820
> 
> So is this an error or do these two work differently than they appear?

Not all wired allocations are subject to the limit (which isn't obvious
from the description).  Anything that calls 'malloc()' in the kernel
will use wired memory for example, and those generally aren't subject to
the limit.  However, user-initiated operations (like a sysctl buffer or
user pages wired via mlock()) are.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54B67AD1.5050609>