From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [PATCH 8/9] readahead: basic support for backwards prefetching Date: Wed, 30 Nov 2011 08:24:25 +0800 Message-ID: <20111130002425.GA8734@localhost> References: <20111129130900.628549879@intel.com> <20111129131456.925952168@intel.com> <20111129153552.GP5635@quack.suse.cz> <4ED50A63.1010805@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Jan Kara , Andrew Morton , Andi Kleen , "Li, Shaohua" , Linux Memory Management List , "linux-fsdevel@vger.kernel.org" , LKML To: =?utf-8?Q?P=C3=A1draig?= Brady Return-path: Received: from mga14.intel.com ([143.182.124.37]:52675 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757063Ab1K3AY2 (ORCPT ); Tue, 29 Nov 2011 19:24:28 -0500 Content-Disposition: inline In-Reply-To: <4ED50A63.1010805@draigBrady.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 30, 2011 at 12:37:55AM +0800, P=C3=A1draig Brady wrote: > On 11/29/2011 03:35 PM, Jan Kara wrote: > > Someone already mentioned this earlier and I don't think I've see= n a > > response: Do you have a realistic usecase for this? I don't think I= 've ever > > seen an application reading file backwards... >=20 > tac, tail -n$large, ... Indeed! tac-4425 [000] 73358.419777: readahead: readahead-random(= dev=3D0:16, ino=3D1548445, req=3D750+1, ra=3D750+1-0, async=3D0) =3D 1 tac-4425 [004] 73358.442030: readahead: readahead-backwar= ds(dev=3D0:16, ino=3D1548445, req=3D748+2, ra=3D746+5-0, async=3D0) =3D= 4 tac-4425 [004] 73358.443312: readahead: readahead-backwar= ds(dev=3D0:16, ino=3D1548445, req=3D744+2, ra=3D726+25-0, async=3D0) =3D= 20 tail-4369 [000] 72633.696307: readahead: readahead-random(= dev=3D0:16, ino=3D1548450, req=3D750+1, ra=3D750+1-0, async=3D0) =3D 1 tail-4369 [004] 72634.042106: readahead: readahead-backwar= ds(dev=3D0:16, ino=3D1548450, req=3D748+2, ra=3D746+5-0, async=3D0) =3D= 4 tail-4369 [004] 72634.043231: readahead: readahead-backwar= ds(dev=3D0:16, ino=3D1548450, req=3D744+2, ra=3D726+25-0, async=3D0) =3D= 20 tail-4369 [004] 72634.176216: readahead: readahead-backwar= ds(dev=3D0:16, ino=3D1548450, req=3D724+2, ra=3D626+125-0, async=3D0) =3D= 100 However I see the readahead requests always be snapped to EOF. So it's obvious the "snap to EOF" logic need some limiting based on max readahead size. Thanks, =46engguang -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html