The strangeness called `sbin'

Ed Schouten ed at 80386.nl
Thu Nov 10 18:16:28 UTC 2011


* Garrett Cooper <yanegomi at gmail.com>, 20111110 19:12:
> On Thu, Nov 10, 2011 at 9:47 AM, Ed Schouten <ed at 80386.nl> wrote:
> > * Peter Wemm <peter at wemm.org>, 20111110 18:33:
> >> Having /sbin in $PATH where /sbin is a symlink to /bin would be worse
> >> than having no /sbin at all, from a perspective of rootvnode lock
> >> lifetime.  If you can figure out how to get people to remove /sbin and
> >> /usr/sbin from their paths after the symlink changes then it becomes a
> >> moot point.  But heck, I still have /usr/X11R6 in mine... :(
> >
> > On the other hand, if people used to have /sbin in their path and *do*
> > remove it properly after the upgrade, they should in theory see a
> > performance improvement, right?
> 
>     Doesn't the negative directory cache (namei, etc) mitigate this?

Peter is also talking about the fact that if you have a PATH like
/bin:/sbin:... and /sbin is a symbolic link to /bin, you end up doing
this:

	execve("/bin/YOURAPP", ...) -> fails
	execve("/sbin/YOURAPP", ...) -> fails
	...
	execve("/some/other/directory/YOURAPP", ...) -> success

The first two system calls together are expected to be slightly slower
than they used to be, because both these directories have now grown.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20111110/939ea93a/attachment.pgp


More information about the freebsd-arch mailing list