From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: batched write Date: Sat, 17 Jun 2006 10:04:58 -0700 Message-ID: <20060617100458.0be18073.akpm@osdl.org> References: <44736D3E.8090808@namesys.com> <20060524175312.GA3579@zero> <44749E24.40203@namesys.com> <20060608110044.GA5207@suse.de> <1149766000.6336.29.camel@tribesman.namesys.com> <20060608121006.GA8474@infradead.org> <1150322912.6322.129.camel@tribesman.namesys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: hch@infradead.org, Reiserfs-Dev@namesys.com, Linux-Kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from smtp.osdl.org ([65.172.181.4]:43756 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1750723AbWFQRFK (ORCPT ); Sat, 17 Jun 2006 13:05:10 -0400 To: "Vladimir V. Saveliev" In-Reply-To: <1150322912.6322.129.camel@tribesman.namesys.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 15 Jun 2006 02:08:32 +0400 "Vladimir V. Saveliev" wrote: > The core of generic_file_buffered_write is > do { > grab_cache_page(); > a_ops->prepare_write(); > copy_from_user(); > a_ops->commit_write(); > > filemap_set_next_iovec(); > balance_dirty_pages_ratelimited(); > } while (count); > > > Would it make sence to rework this code with adding new address_space > operation - fill_pages so that looks like: > > do { > a_ops->fill_pages(); > filemap_set_next_iovec(); > balance_dirty_pages_ratelimited(); > } while (count); > > generic implementation of fill_pages would look like: > > generic_fill_pages() > { > grab_cache_page(); > a_ops->prepare_write(); > copy_from_user(); > a_ops->commit_write(); > } > There's nothing which leaps out and says "wrong" in this. But there's nothing which leaps out and says "right", either. It seems somewhat arbitrary, that's all. We have one filesystem which wants such a refactoring (although I don't think you've adequately spelled out _why_ reiser4 wants this). To be able to say "yes, we want this" I think we'd need to understand which other filesystems would benefit from exploiting it, and with what results?