pageout question

RW rwmaillists at googlemail.com
Sun Jul 25 13:41:49 UTC 2010


On Sun, 25 Jul 2010 13:07:21 +0300
Andriy Gapon <avg at freebsd.org> wrote:

> on 25/07/2010 02:31 RW said the following:

> > 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.  
> 

> But I am not sure about "clean pages in the inactive queue" ... But I
> do not see any code ensuring level of _clean_ inactive pages. 

In FreeBSD the inactive queue contains disk cache pages which normally
provide most of the clean pages needed. In addition pages are dribbled
out to swap, and the resulting clean pages are placed at the back of
the inactive queue to make another pass. 

> 
> > 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. 
> 
> Well, OTOH, if the current pass results in many pages being
> re-activated and many pages still left on the inactive queue because
> they are dirty (see maxlaunder in vm_pageout_scan), 

Dirty-pages  make three passes through the inactive queue: twice dirty,
once clean. They are paged-out at the end of the second paass, so it's
unlike that they reactivated except under very heavy thrashing. 

> then it is
> premature to quit paging when we only reached bare minimum of
> available pages (see pass and maxlaunder again).  IMHO, of course.

It's not the bare minimum, that's another level that vm_page_count_min()
tests for.


More information about the freebsd-hackers mailing list