From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: your mail Date: Tue, 22 Jun 2010 10:59:41 +0800 Message-ID: <20100622025941.GA6147@localhost> References: <1276706031-29421-1-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , npiggin@suse.de To: Jan Kara Return-path: Received: from mga02.intel.com ([134.134.136.20]:63624 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753839Ab0FVC7q (ORCPT ); Mon, 21 Jun 2010 22:59:46 -0400 Content-Disposition: inline In-Reply-To: <1276706031-29421-1-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > - use tagging also for WB_SYNC_NONE writeback - there's problem with an > interaction with wbc->nr_to_write. If we tag all dirty pages, we can > spend too much time tagging when we write only a few pages in the end > because of nr_to_write. If we tag only say nr_to_write pages, we may > not have enough pages tagged because some pages are written out by > someone else and so we would have to restart and tagging would become This could be addressed by ignoring nr_to_write for the WB_SYNC_NONE writeback triggered by sync(). write_cache_pages() already ignored nr_to_write for WB_SYNC_ALL. > essentially useless. So my option is - switch to tagging for WB_SYNC_NONE > writeback if we can get rid of nr_to_write. But that's a story for > a different patch set. Besides introducing overheads, it will be a policy change in which the system loses control to somehow "throttle" writeback of huge files. So it may be safer to enlarge nr_to_write instead of canceling it totally. Thanks, Fengguang