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