Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754131Ab3EGO16 (ORCPT ); Tue, 7 May 2013 10:27:58 -0400 Received: from mx2.netapp.com ([216.240.18.37]:13797 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753738Ab3EGO14 convert rfc822-to-8bit (ORCPT ); Tue, 7 May 2013 10:27:56 -0400 X-IronPort-AV: E=Sophos;i="4.87,628,1363158000"; d="scan'208";a="23715179" From: "Myklebust, Trond" To: Jiri Slaby CC: "jirislaby@gmail.com" , "linux-kernel@vger.kernel.org" , NeilBrown , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH 09/15] Make selection of 'readdir-plus' adapt to usage patterns. Thread-Topic: [PATCH 09/15] Make selection of 'readdir-plus' adapt to usage patterns. Thread-Index: AQHOSy2yvzaHwPAZYk+LNQbZQ6FUiJj6PQIA Date: Tue, 7 May 2013 14:27:54 +0000 Message-ID: <1367936852.3580.6.camel@leira.trondhjem.org> References: <1367936303-13386-1-git-send-email-jslaby@suse.cz> <1367936303-13386-9-git-send-email-jslaby@suse.cz> In-Reply-To: <1367936303-13386-9-git-send-email-jslaby@suse.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.104.60.115] Content-Type: text/plain; charset=US-ASCII Content-ID: <8370D1179A8F5248B082BB1448666CA9@hq.netapp.com> Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1892 Lines: 51 On Tue, 2013-05-07 at 16:18 +0200, Jiri Slaby wrote: > From: NeilBrown > > While the use of READDIRPLUS is significantly more efficient than > READDIR followed by many GETATTR calls, it is still less efficient > than just READDIR if the attributes are not required. > > We can get a hint as to whether the application requires attr information > by looking at whether any ->getattr calls are made between > ->readdir calls. > If there are any, then getting the attributes seems to be worth while. > > This patch tracks whether there have been recent getattr calls on > children of a directory and uses that information to selectively > disable READDIRPLUS on that directory. > > The first 'readdir' call is always served using READDIRPLUS. > Subsequent calls only use READDIRPLUS if there was a getattr on a child > in the mean time. > > The locking of ->d_parent access needs to be reviewed. > As the bit is simply a hint, it isn't critical that it is set > on the "correct" parent if a rename is happening, but it is > critical that the 'set' doesn't set a bit in something that > isn't even an inode any more. > > Acked-by: NeilBrown > Signed-off-by: Neil Brown > Signed-off-by: Jiri Slaby > Cc: Trond Myklebust > Cc: linux-nfs@vger.kernel.org > --- Why am I being Cced on this? You have looked at commit d69ee9b85541a69a1092f5da675bd23256dc62af (NFS: Adapt readdirplus to application usage patterns) which was upstreamed in Linux 3.5, right? -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@netapp.com www.netapp.com -- 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/