on 25/07/2010 16:41 RW said the following: > On Sun, 25 Jul 2010 13:07:21 +0300 > Andriy Gapon <a...@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.
Well, "normally" and "most" are not quite quantitative. Personally, I do not see any guarantees that inactive queue would contain enough clean pages to reach paging target on a single 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. I didn't mean to say that dirty pages would get re-activated. Clean pages can perfectly be re-activated if they were referenced since their de-activation time. >> 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. I meant bare minimum to stop paging, that is, going above lower watermark of the paging hysteresis. -- Andriy Gapon _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"