Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Mar 2004 22:56:10 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Don Lewis <truckman@freebsd.org>
Cc:        rwatson@freebsd.org
Subject:   Re: sysctl spinning (was: Re: ps Causes Hard Hang)
Message-ID:  <20040304224900.K8400@gamplex.bde.org>
In-Reply-To: <200403040938.i249cU7E003667@gw.catspoiler.org>
References:  <200403040938.i249cU7E003667@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Mar 2004, Don Lewis wrote:

> Hmn, it looks like vm_page_max_wired is dynamically set to one third of
> free system memory in vm_pageout().
>
>         /* XXX does not really belong here */
>         if (vm_page_max_wired == 0)
>                 vm_page_max_wired = cnt.v_free_count / 3;
>
> I was under the impression that it was one third of physical memory.

The variable is only set on system startup, and then the free memory is
not very different from physical memory (except on machines with too
little memory, and then the free memory is even more relevant for setting
memory limits).

> Should the failure to wire the buffer be mapped to a different errno?

I think so (at least for very large requests).

> There may be cases when it is valid to retry the request.
>
> The code that loops on EAGAIN was added in the rev 1.63 of
> kern_sysctl.c.

I think EAGAIN was only meant for retrying after transient changes
to the data.

Bruce



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