small patch for pageout. Comments?

Larry McVoy lm at mcvoy.com
Thu Nov 30 20:50:42 UTC 2017


On Thu, Nov 30, 2017 at 03:47:50PM -0500, Mark Johnston wrote:
> > I dunno if there is a "right amount".  I could make it a little smarter by
> > keeping track of how many pages we freed and sleep if we freed none in a 
> > scan (which seems really unlikely).
> 
> This situation can happen if the inactive queue is full of dirty pages.
> A problem with your patch is that we might not give enough time to the
> laundry thread (the thread responsible for writing the contents of dirty
> pages to disk and returning them to inactive queue for the page daemon
> to free) to write out dirty pages. In this case we might trigger the OOM
> killer prematurely, and in fact this scenario is what motivated r300865.
> So I would argue that we do in fact need to sleep if the page daemon is
> failing to make progress, in order to give time for I/O to complete.

OK, that sounds reasonable.  So what defines progress?  v_dfree not 
increasing?  Is one page freed progress?


More information about the freebsd-arch mailing list