Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Sep 1997 22:47:00 +0200
From:      Poul-Henning Kamp <phk@freebsd.org>
To:        fs@freebsd.org
Subject:   getcwd() as syscall...
Message-ID:  <5464.874183620@critter.freebsd.dk>

next in thread | raw e-mail | index | archive | help

Now that we have v_dd and v_ddid in the vnodes, and since the namecache
is quite reluctant to throw out directories, it would be possible to
make a "getcwdifyoucan()" syscall, which would run a lot faster than
the getcwd() library routine.

The "ifyoucan" bit reflects that it may actually not be able to if the
required information isn't in the namecache, in which case I would
prefer to have userland fall back to the usual method, rather than
have to implement it in the kernel.

I have no idea how much this would or wouldn't save in time.  I know
that during a "make world", 13 % of the name cache lookups are for
"..", and quite a number of these probably come from getcwd(), so 
there is something to go aim for.

Comments ?

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5464.874183620>