Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754277Ab0BBRlm (ORCPT ); Tue, 2 Feb 2010 12:41:42 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:38015 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751445Ab0BBRlk (ORCPT ); Tue, 2 Feb 2010 12:41:40 -0500 Date: Tue, 2 Feb 2010 09:39:38 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Wu Fengguang cc: Andrew Morton , Jens Axboe , Peter Zijlstra , Linux Memory Management List , linux-fsdevel@vger.kernel.org, LKML Subject: Re: [PATCH 10/11] readahead: dont do start-of-file readahead after lseek() In-Reply-To: <20100202153317.644170708@intel.com> Message-ID: References: <20100202152835.683907822@intel.com> <20100202153317.644170708@intel.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 906 Lines: 28 On Tue, 2 Feb 2010, Wu Fengguang wrote: > > Some applications (eg. blkid, id3tool etc.) seek around the file > to get information. For example, blkid does > seek to 0 > read 1024 > seek to 1536 > read 16384 > > The start-of-file readahead heuristic is wrong for them, whose > access pattern can be identified by lseek() calls. > > So test-and-set a READAHEAD_LSEEK flag on lseek() and don't > do start-of-file readahead on seeing it. Proposed by Linus. > > CC: Linus Torvalds > Signed-off-by: Wu Fengguang Acked-by: Linus Torvalds Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/