From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 1/2] writeback: Improve busyloop prevention Date: Thu, 20 Oct 2011 17:32:17 +0200 Message-ID: <20111020153217.GJ5653@quack.suse.cz> References: <1318453043-32057-1-git-send-email-jack@suse.cz> <1318453043-32057-2-git-send-email-jack@suse.cz> <20111013142638.GB6938@localhost> <20111013143939.GA9691@localhost> <20111013201835.GD27363@quack.suse.cz> <20111014160047.GA13330@localhost> <20111014162807.GA4617@localhost> <20111018005128.GI4528@quack.suse.cz> <20111020094649.GA11291@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Wu Fengguang , "linux-fsdevel@vger.kernel.org" , Dave Chinner To: Christoph Hellwig Return-path: Received: from cantor2.suse.de ([195.135.220.15]:57845 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754556Ab1JTPcV (ORCPT ); Thu, 20 Oct 2011 11:32:21 -0400 Content-Disposition: inline In-Reply-To: <20111020094649.GA11291@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu 20-10-11 05:46:49, Christoph Hellwig wrote: > On Tue, Oct 18, 2011 at 02:51:28AM +0200, Jan Kara wrote: > > > It's still puzzling why dirty pages remain at 286 and does not get > > > cleaned by either flusher threads for local XFS and NFSROOT for so > > > long time.. > > I was looking at this as well. So the reason why pages were not cleaned > > by the flusher thread is that there were 2 dirty inodes and the inode with > > dirty pages had i_dirtied_whan newer than the time when we started this > > background writeback. Thus the running background writeback work always > > included only the other inode which has no dirty pages but I_DIRTY_SYNC set. > > Apparently XFS is stubborn and refuses to write the inode although we try > > rather hard. That is probably because dd writing to this inode is stuck in > > balance_dirty_pages() and holds ilock - which is a bit unfortunate behavior > > but what can we do... > > Stop writing data from balance_dirty_pages()? Well, this was also with Fengguang's IO-less patches so writing from balance_dirty_pages() was not an issue. > Anyway, XFS tries very hard to not block in a non-block ->write_inode > or ->writepages, which generally is a good thing to avoid getting stuck > in the flusher thread. For cases like this where an inode is long > beyond it's due time it might make sense to simply do a synchronous > write_inode from the flusher thread to force the inode out. Yeah, that might be a good option. Honza -- Jan Kara SUSE Labs, CR