Date: Thu, 30 Nov 2017 12:50:41 -0800 From: Larry McVoy <lm@mcvoy.com> To: Mark Johnston <markj@FreeBSD.org> Cc: Larry McVoy <lm@mcvoy.com>, Warner Losh <imp@bsdimp.com>, Scott Long <scottl@netflix.com>, Kevin Bowling <kbowling@llnw.com>, Drew Gallatin <gallatin@netflix.com>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: small patch for pageout. Comments? Message-ID: <20171130205041.GA3924@mcvoy.com> In-Reply-To: <20171130204750.GB21606@raichu> References: <20171130173424.GA811@mcvoy.com> <CANCZdfqL9ZsKTfFi%2BvsCTh3yaNjtwaYYY3fvivdbNybBnujawg@mail.gmail.com> <20171130184923.GA30262@mcvoy.com> <20171130204750.GB21606@raichu>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171130205041.GA3924>