[lkml]   [2010]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 15/18] fs: introduce a per-cpu last_ino allocator
Le vendredi 08 octobre 2010 à 06:03 -0400, Christoph Hellwig a écrit :
> On Fri, Oct 08, 2010 at 10:56:58AM +0100, Al Viro wrote:
> > FWIW, that one is begging to be split; what I mean is that there are
> > two classes of callers; ones that will set i_ino themselves anyway
> > and ones that really want i_ino invented. Two functions?
> There's no reason to add i_ino before adding it to the per-sb list,
> we don't do so either for inodes acquired via iget. The fix is simply
> to stop assigning i_ino in new_inode and call the helper to get it in
> the place that need it after the call to new_inode. Later we can
> even move to a lazy assignment scheme where needed. I'd also really
> like to get a grip on why the simple counters if fine for some
> filesystems while we need iunique() for others.

If iunique() was scalable, sockets could use it, so that we can have
hard guarantee two sockets on machine dont have same inum.

A reasonable compromise here is to use a simple and scalable allocator,
and take the risk two sockets have same inum.

While it might break some applications playing fstats() games, on
sockets, current schem is vastly faster.

I worked with machines with millions of opened socket concurrently,
iunique() was not an option, and application didnt care of possible inum

For disk files, inum _must_ be unique per fs, for sockets, its only if
you want strict compliance to some standards.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2010-10-08 12:23    [W:0.143 / U:2.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site