From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 0/2] Improve writeout pattern from xfs_flush_pages() Date: Thu, 4 Aug 2011 14:37:22 +0200 Message-ID: <20110804123722.GB20800@quack.suse.cz> References: <1312404545-15400-1-git-send-email-jack@suse.cz> <20110803214206.GA20477@infradead.org> <20110804103616.GF17196@quack.suse.cz> <20110804104210.GA30823@infradead.org> <20110804120724.GA20800@quack.suse.cz> <20110804121916.GA17783@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from cantor2.suse.de ([195.135.220.15]:40924 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752116Ab1HDMhY (ORCPT ); Thu, 4 Aug 2011 08:37:24 -0400 Content-Disposition: inline In-Reply-To: <20110804121916.GA17783@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu 04-08-11 08:19:16, Christoph Hellwig wrote: > On Thu, Aug 04, 2011 at 02:07:24PM +0200, Jan Kara wrote: > > Hmm, BTW, shouldn't the call to xfs_flush_pages() in > > xfs_file_buffered_aio_write() be converted to an asynchronous one? I don't > > quite see a point in waiting for io completion... Generally, flushing of > > the inode there seems of limited usefulness to me since that inode could be > > just a tiny victim not holding much delayallocated blocks. > > This comes from commit > > xfs: make inode flush at ENOSPC synchronous > > from Dave - before that it was asynchronous and in weird context, so > it seems we defintively need it to be synchronous. From the changelog it seems it needs to be synchronous in the sense that we don't offload flushing to a different thread as we used to. Also the reason why previously flushing didn't work was that we held page locks and IO lock but it's not the case in xfs_file_buffered_aio_write() anymore. So filemap_flush() still looks like an appropriate thing to me. > I agree that just flushing this inode seems like a rather odd handling > for ENOSPC. It's even more odd as we already use the big hammer before > in when we git ENOSPC in ->write_begin. The only thing I can imagine is > that this is the last attempt to get anything freed. OK, I'll leave it there then. I just wonder whether I should convert it to filemap_flush() or to filemap_write_and_wait()... Honza -- Jan Kara SUSE Labs, CR