pageout question

RW rwmaillists at googlemail.com
Sat Jul 24 23:31:51 UTC 2010


On Sat, 24 Jul 2010 23:23:07 +0300
Andriy Gapon <avg at 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. 


More information about the freebsd-hackers mailing list