[lkml]   [2010]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/7] sysfs: Keep an nlink count on sysfs directories.

On 01/12/2010 10:06 AM, Eric W. Biederman wrote:
>> 64k is too small. 10 gig interfaces can currently service 50-100k users,
>> each of which requires their own network device.
> 64k is the point at which I stop returning a userful nlink number to
> userspace, sysfs directories can still scale to any size.
> I could legitimately always return nlink == 1, and all userspace
> utilities that I know of would be fine, but I am trying to be a bit
> more polite than that.

I don't think it's more polite. It's more error-prone. 64k is a
limit where breach would be rare enough to be unexpected but would
still happen on corner cases. I don't know what would be the end
result of incorrect nlink but it's far better to have something which
behaves consistently than to have something which flips its meaning
after reaching certain rare but still quite possible limit. If nlink
is something we can ignore, just set it to 1 for all sysfs files. If
nlink must be kept correct, use 32bit limit and fail to create more.

> I don't see the link count as interesting enough to store more than
> 16bits for it. Even with 32bits of storage for nlink sysfs would have
> to have to handle the rollover case as I am doing now. So I don't
> see any advantage to storing more bits.

I really don't think reiserfs's example is a good one to follow
especially with significantly lowered limit.



 \ /
  Last update: 2010-01-12 07:19    [W:0.066 / U:32.388 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site