From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH] writeback: Fix occasional slow sync(1) Date: Fri, 16 Aug 2013 14:21:29 +0200 Message-ID: <20130816122129.GA22909@quack.suse.cz> References: <1373881514-4214-1-git-send-email-jack@suse.cz> <20130815151504.87263764989e707c37b70143@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Al Viro , linux-fsdevel@vger.kernel.org, Paul Taysom , stable@vger.kernel.org To: Andrew Morton Return-path: Content-Disposition: inline In-Reply-To: <20130815151504.87263764989e707c37b70143@linux-foundation.org> Sender: stable-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu 15-08-13 15:15:04, Andrew Morton wrote: > On Mon, 15 Jul 2013 11:45:14 +0200 Jan Kara wrote: > > > In case when system contains no dirty pages, wakeup_flusher_threads() > > will submit WB_SYNC_NONE writeback for 0 pages so wb_writeback() exits > > immediately without doing anything. Thus sync(1) will write all the > > dirty inodes from a WB_SYNC_ALL writeback pass which is slow. > > > > Fix the problem by using get_nr_dirty_pages() in > > wakeup_flusher_threads() instead of calculating number of dirty pages > > manually. That function also takes number of dirty inodes into account. > > Fair enough. > > > CC: stable@vger.kernel.org > > Unexpected. What was your thinking here? Right, probably the problem isn't serious enough. Just discard the CC please. Thanks! Honza -- Jan Kara SUSE Labs, CR