From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Tso Subject: Re: [RFC] Copy on First Read? Date: Mon, 10 Jul 2006 13:59:27 -0400 Message-ID: <20060710175927.GA16137@thunk.org> References: <200607100904.44983.roger.larsson@norran.net> <20060710082711.GD15380@schatzie.adilger.int> <200607101225.46928.roger.larsson@norran.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from thunk.org ([69.25.196.29]:56506 "EHLO thunker.thunk.org") by vger.kernel.org with ESMTP id S1422733AbWGJR7b (ORCPT ); Mon, 10 Jul 2006 13:59:31 -0400 To: Roger Larsson Content-Disposition: inline In-Reply-To: <200607101225.46928.roger.larsson@norran.net> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Jul 10, 2006 at 12:25:46PM +0200, Roger Larsson wrote: > Not double since it is only the first read after a write that needs to be > rewritten. My assumption is that most files are written fewer times than > they are read. And the read for the copy is free since that was what > triggered it. But there is a cost, and the question is how much does this buy you compared to simply getting it right the first time, either via a delayed allocation scheme, or where the application knows how big the file is up front (as is often the case). In addition your scheme is extremely pessimal behaviour for temporary files which are writtena and read once before being deleted.... - Ted