From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jared Hulbert" Subject: Re: [PATCH 04/10] AXFS: axfs_inode.c Date: Thu, 21 Aug 2008 20:27:50 -0700 Message-ID: <6934efce0808212027q412c4cbbp6ea8673a7d3bc1b9@mail.gmail.com> References: <48AD00F0.5030403@gmail.com> <48AE0697.5040706@lougher.demon.co.uk> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=uhVxjRRLr7dfvAbwAf7gUuqLlPc0cPaYdAXUniMP3Ik=; b=XSL1wghzdTEVaxayP86AalfsFSEY1YeR06FEu+rFLNmg25nnSquoxeP41zeu8gXtLs m2/Mdd+syp2ZTaFDIl5Ed6mEAO1WAitL0G83NoubHawvkjIYZ/m6G1BfGLyAJpDWOhfn AJz6zNbNLuy2Y7OS26bM97yP7nbdL35fV2k5U= In-Reply-To: <48AE0697.5040706@lougher.demon.co.uk> Content-Disposition: inline Sender: linux-embedded-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Phillip Lougher Cc: Linux-kernel@vger.kernel.org, linux-embedded@vger.kernel.org, linux-mtd , =?UTF-8?Q?J=C3=B6rn_Engel?= , tim.bird@am.sony.com, cotte@de.ibm.com, nickpiggin@yahoo.com.au > I assume compressed blocks can be larger than PAGE_CACHE_SIZE? This suffers > from the rather obvious inefficiency that you decompress a big block > > PAGE_CACHE_SIZE, but only copy one PAGE_CACHE_SIZE page out of it. If > multiple files are being read simultaneously (a common occurrence), then > each is going to replace your one cached uncompressed block > (sbi->current_cnode_index), leading to decompressing the same blocks over > and over again on sequential file access. > > readpage file A, index 1 -> decompress block X > readpage file B, index 1 -> decompress block Y (replaces X) > readpage file A, index 2 -> repeated decompress of block X (replaces Y) > readpage file B, index 2 -> repeated decompress of block Y (replaces X) > > and so on. Yep. Been thinking about optimizing it. So far it hasn't been an issue for my customers. Most fs traffic being on the XIP pages. Once I get a good automated performance test up we'll probably look into something to improve this.