Re: Who changed /proc/<pid>/ in 2.6.0-test5-bk9?

From: Jamie Lokier
Date: Thu Oct 02 2003 - 21:55:32 EST


Linus Torvalds wrote:
> And it may or may not make sense to not have a "/proc/<nn>/task/<yy>/fd"
> directory at all if the thread shares file descriptors with the thread
> group leader. That would be a fairly easy optimization.

If you make /proc/.../fd return the same inode numbers for the
identical file descriptor tables, that would be just as good for fuser
performance.

fuser would stat() each of the /proc/<nn>/task/<yy>/fd entries and see
that they're the same as the group leader.

It is the same number of operations as checking for the non-existence
of /proc/<nn>/task/<yy>/fd entries, but more flexible.

Alternatively you could make the task fd directories be symbolic
links to the group leader fd directory.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/