From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lazybastard.de ([212.112.238.170] helo=longford.lazybastard.org) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1JFvvY-0002EO-Ag for linux-mtd@lists.infradead.org; Fri, 18 Jan 2008 18:26:52 +0000 Date: Fri, 18 Jan 2008 19:17:44 +0100 From: =?utf-8?B?SsO2cm4=?= Engel To: Josh Boyer Subject: Re: Jffs2 and big file = very slow jffs2_garbage_collect_pass Message-ID: <20080118181744.GA15039@lazybastard.org> References: <478F7E6D.8010300@parrot.com> <20080117162601.GA6677@lazybastard.org> <20080117114353.0bc71dac@zod.rchland.ibm.com> <479073D1.5010406@parrot.com> <20080118064852.026b0c82@zod.rchland.ibm.com> <4790D11E.6060201@parrot.com> <20080118115531.2deef9fb@zod.rchland.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080118115531.2deef9fb@zod.rchland.ibm.com> Cc: David Woodhouse , =?utf-8?B?SsO2cm4=?= Engel , linux-mtd@lists.infradead.org, Matthieu CASTET List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 18 January 2008 11:55:31 -0600, Josh Boyer wrote: > > That seems consistent with JFFS2 doing the CRC checks and constructing > the in-memory representation of your large file. I suspect the older > list-based in-memory implementation would have taken even longer, but > there could be something amiss with the rb-tree stuff perhaps. There is something conceptually amiss with rb-trees. Each node effectively occupies its own cacheline. With those 40k+ nodes, you would need a rather sizeable cache with at least 20k cachelines to have an impact. Noone does. So for all practical purposes, every single lookup will go to main memory. Maybe it is about time to suggest trying logfs? Jörn -- People will accept your ideas much more readily if you tell them that Benjamin Franklin said it first. -- unknown