Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757111AbXJNLJt (ORCPT ); Sun, 14 Oct 2007 07:09:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755007AbXJNLJm (ORCPT ); Sun, 14 Oct 2007 07:09:42 -0400 Received: from smtp.ustc.edu.cn ([202.38.64.16]:37589 "HELO ustc.edu.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1754832AbXJNLJl (ORCPT ); Sun, 14 Oct 2007 07:09:41 -0400 Message-ID: <392360181.25583@ustc.edu.cn> X-EYOUMAIL-SMTPAUTH: wfg@mail.ustc.edu.cn Date: Sun, 14 Oct 2007 19:09:37 +0800 From: Fengguang Wu To: richard kennedy Cc: lkml , linux-mm Subject: Re: [RFC] mm - background_writeout exits when pages_skipped ? Message-ID: <20071014110937.GA9235@mail.ustc.edu.cn> References: <1192123174.3082.41.camel@castor.rsk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1192123174.3082.41.camel@castor.rsk.org> X-GPG-Fingerprint: 53D2 DDCE AB5C 8DC6 188B 1CB1 F766 DA34 8D8B 1C6D User-Agent: Mutt/1.5.16 (2007-06-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1328 Lines: 38 On Thu, Oct 11, 2007 at 06:19:34PM +0100, richard kennedy wrote: > When background_writeout() (mm/page-writeback.c) finds any pages_skipped > in writeback_inodes() and it didn't meet any congestion, it exits even > when it hasn't written enough pages yet. > > Performing 2 ( or more) concurrent copies of a large file, often creates > lots of skipped pages (1000+) making background_writeout exit and so > pages don't get written out until we reach dirty_ratio. > > I added some instrumentation to fs/buffer.c in > __block_write_full_page(..) and all the skipped pages come from here :- > > done: > if (nr_underway == 0) { > /* > * The page was marked dirty, but the buffers were > * clean. Someone wrote them back by hand with > * ll_rw_block/submit_bh. A rare case. > */ > end_page_writeback(page); > > /* > * The page and buffer_heads can be released at any time from > * here on. > */ > wbc->pages_skipped++; /* We didn't write this page */ FYI: The above line has just been removed in 2.6.23-mm1, which fixed the bug. Thank you, Fengguang - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/