From mboxrd@z Thu Jan 1 00:00:00 1970 From: nickpiggin@yahoo.com.au (Nick Piggin) Date: Tue, 10 Feb 2009 16:56:13 +1100 Subject: [ltt-dev] [PATCH] mm fix page writeback accounting to fix oom condition under heavy I/O In-Reply-To: References: <20090120122855.GF30821@kernel.dk> <20090210033652.GA28435@Krystal> Message-ID: <200902101656.13792.nickpiggin@yahoo.com.au> On Tuesday 10 February 2009 16:23:56 Linus Torvalds wrote: > On Mon, 9 Feb 2009, Mathieu Desnoyers wrote: > > So this patch fixes this behavior by only decrementing the page > > accounting _after_ the block I/O writepage has been done. > > This makes no sense, really. > > Or rather, I don't mind the notion of updating the counters only after IO > per se, and _that_ part of it probably makes sense. But why is it that you > only then fix up two of the call-sites. There's a lot more call-sites than > that for this function. Well if you do that, then I'd think you also have to change some calculations that today use dirty+writeback. In some ways it does make sense, but OTOH it is natural in the pagecache since it was introduced to treat writeback as basically equivalent to dirty. So writeback && !dirty pages shouldn't cause things to blow up, or if it does then hopefully it is a simple bug somewhere.