From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 3/7] sysfs: Keep an nlink count on sysfs directories. Date: Tue, 12 Jan 2010 09:46:59 +0900 Message-ID: <4B4BC683.7060508@kernel.org> References: <1263241315-19499-3-git-send-email-ebiederm@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Greg Kroah-Hartman , Kay Sievers , linux-kernel@vger.kernel.org, Cornelia Huck , linux-fsdevel@vger.kernel.org, Eric Dumazet , Benjamin LaHaise , Serge Hallyn , "Eric W. Biederman" To: "Eric W. Biederman" Return-path: In-Reply-To: <1263241315-19499-3-git-send-email-ebiederm@xmission.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hello, On 01/12/2010 05:21 AM, Eric W. Biederman wrote: > On large directories sysfs_count_nlinks can be a significant > bottleneck, so keep a count in sysfs_dirent. I was about to suggest changing s_flags to ushort too. Hmmm... adding a new field to sysfs_dirent somewhat worries me but this doesn't add to the size of the structure. How significant bottlenect are we talking about? > If we exceed the maximum number of directory entries we can store > return nlink of 1. An nlink of 1 matches what reiserfs does in this > case, and it let's find and similar utlities know that we have a the > directory nlink can not be used for optimization purposes. Hmmm... what's the limit on reiserfs? Is it 64k too? Thanks. -- tejun