From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 02 May 2005 18:03:55 +0900 (JST) Message-Id: <20050502.180355.38710526.taka@valinux.co.jp> Subject: Re: [PATCH]: VM 3/8 PG_skipped From: Hirokazu Takahashi In-Reply-To: <20050425204327.4436cd77.akpm@osdl.org> References: <16994.40579.617974.423522@gargle.gargle.HOWL> <20050425204327.4436cd77.akpm@osdl.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: akpm@osdl.org Cc: nikita@clusterfs.com, linux-mm@kvack.org List-ID: Hi, > > Don't call ->writepage from VM scanner when page is met for the first time > > during scan. > > > > New page flag PG_skipped is used for this. This flag is TestSet-ed just > > before calling ->writepage and is cleaned when page enters inactive > > list. > > > > One can see this as "second chance" algorithm for the dirty pages on the > > inactive list. > > > > BSD does the same: src/sys/vm/vm_pageout.c:vm_pageout_scan(), > > PG_WINATCFLS flag. > > > > Reason behind this is that ->writepages() will perform more efficient writeout > > than ->writepage(). Skipping of page can be conditioned on zone->pressure. > > > > On the other hand, avoiding ->writepage() increases amount of scanning > > performed by kswapd. > > I worry that this will cause boxes to go oom all over the place, due to the > longer scans which are encountered prior to pages being reclaimed. > > We could of course increase the "oh crap, we've scanned too much" > threshold. We probably need to do that anyway - I shrunk it by heaps early > in 2.5 just as a "let's see who complains" experiment. > > Writeout off the LRU should be a rare case. We should have instrumentation > for that, but we don't. IMHO, I don't think it's always true. Would you please consider mmap'ed pages, which may not be written out by pdflush. It might leave many unexpected dirty pages to the swapcode. I feel it would be better to let pdflush do this things, though. > My gut feel with this patch is to run away in terror, frankly. Thanks, Hirokazu Takahashi. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: aart@kvack.org