Subject: Re: /proc + Linux emul: "exe" is no symlink
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 10/26/2006 07:00:02
On Oct 25, 2006, at 11:16 PM, der Mouse wrote:
>>> lrwxrwxrwx 1 feyrer bedienst 0 Oct 25 00:31 /proc/19364/exe -> /
>>> -r-xr-xr-x 1 root wheel 298032 Aug 11 02:09 /emul/linux/proc/
>> It's bogus -- it requires a vnode-to-name translation that is not
>> always possible, and, when it is, requires the storage of a great
>> deal of extra information in a frequently accessed datastructure in
>> the kernel.
> Howzabout just saving the last-execed pathname? I conjecture (and it
> is just conjecture) that that's what Linux is really doing anyway.
That is essentially what the namei cache does - the last-used path
name to get to a given vnode.