From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 11 Sep 2001 12:05:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 11 Sep 2001 12:05:17 -0400 Received: from shed.alex.org.uk ([195.224.53.219]:11460 "HELO shed.alex.org.uk") by vger.kernel.org with SMTP id ; Tue, 11 Sep 2001 12:05:08 -0400 Date: Tue, 11 Sep 2001 17:05:27 +0100 From: Alex Bligh - linux-kernel Reply-To: Alex Bligh - linux-kernel To: Linus Torvalds , Daniel Phillips Cc: Rik van Riel , Andreas Dilger , Andrea Arcangeli , Kernel Mailing List , Alex Bligh - linux-kernel Subject: Re: linux-2.4.10-pre5 Message-ID: <1033837619.1000227927@[10.132.112.53]> In-Reply-To: In-Reply-To: X-Mailer: Mulberry/2.1.0 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --On Tuesday, September 11, 2001 8:48 AM -0700 Linus Torvalds wrote: > I actually think that the "start read-ahead for inode blocks when you do > readdir" might be a bigger win, because that would be a _new_ kind of > read-ahead that we haven't done before, and might improve performance for > things like "ls -l" in the cold-cache situation.. This was exactly what I did in the example I gave Daniel, except we went slightly further (ONLY if I/O was quiescent) and effectively went through the readdir, if we found a directory, preloaded (effectively) the blocks we'd need for a readdir() on that, and if we found a file, preloaded the first few blocks (this will be harder if you've no obvious logical map); before actually reading any of the stuff, we'd get a list of the blocks to read, and sort it as per physical layout. We also logically read ahead files as soon as they were opened (we generally had the first few locks from the above oepration). For directories with short files in, and/or recursive tree operations, it was a big win. [It might be less of a win under Linux as the peculiar environment this lived on had resource-fork-esque stuff represented by directory like things.] -- Alex Bligh