Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jul 2010 00:31:44 +0100
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: pageout question
Message-ID:  <20100725003144.3cfead39@gumby.homeunix.com>
In-Reply-To: <4C4B4BAB.3000005@freebsd.org>
References:  <4C4B4BAB.3000005@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 24 Jul 2010 23:23:07 +0300
Andriy Gapon <avg@freebsd.org> wrote:

> 
> There is a good deal of comments in the vm_pageout.c code that imply
> that we use a hysteresis approach to deal with low available pages
> condition.
> 
> 
> In general, the hysteresis, the comments and the code make sense.
> My doubt, though, is about the block of code that is right below the
> comment quoted above:
> if (vm_pages_needed && !vm_page_count_min()) {
>         if (!vm_paging_needed())
>                 vm_pages_needed = 0;
>         wakeup(&cnt.v_free_count);
> }

As I understand it the hysteresis is done inside vm_pageout_scan, and
the expectation is that one pass will typically satisfy this because the
design aims to keep enough clean pages in the inactive queue.  

I'm not sure if  the vm_paging_needed() call is correct or not, but it
may be that that the intent is to avoid immediately going back to a
depleted inactive queue when cache+free is within normal bounds,
because it could result in avoidable paging to swap. 



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