Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Aug 2008 10:51:27 -0500
From:      Brooks Davis <brooks@freebsd.org>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        Ivan Voras <ivoras@freebsd.org>, Christian Brueffer <brueffer@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: Magic symlinks redux
Message-ID:  <20080822155126.GD57443@lor.one-eyed-alien.net>
In-Reply-To: <20080822154631.GA61495@onelab2.iet.unipi.it>
References:  <g8kv7v$sp2$1@ger.gmane.org> <20080822090448.GB57441@onelab2.iet.unipi.it> <48AE89DC.9080408@yandex.ru> <g8m458$d3$1@ger.gmane.org> <20080822120525.GA1366@haakonia.hitnet.RWTH-Aachen.DE> <20080822145616.GA61094@onelab2.iet.unipi.it> <20080822150728.GB57443@lor.one-eyed-alien.net> <20080822154631.GA61495@onelab2.iet.unipi.it>

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

--Q0rSlbzrZN6k9QnT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 22, 2008 at 05:46:31PM +0200, Luigi Rizzo wrote:
> On Fri, Aug 22, 2008 at 10:07:29AM -0500, Brooks Davis wrote:
> > On Fri, Aug 22, 2008 at 04:56:16PM +0200, Luigi Rizzo wrote:
> > > On Fri, Aug 22, 2008 at 02:05:26PM +0200, Christian Brueffer wrote:
> > > > On Fri, Aug 22, 2008 at 12:24:41PM +0200, Ivan Voras wrote:
> > > ...
> > > > > This patch is huge. As far as I can tell DragonflyBSD has a whole=
=20
> > > > > framework dedicated to varsyms, spread across a fair part of the =
kernel=20
> > > > > and with at least one special userland utility. It allows the ope=
rator=20
> > > > > to define his own variables that can be used in the substitutions=
, and I=20
> > > > > don't see that it predefines "special" variables like "uid" and=
=20
> > > > > "hostname". It's not necessarily a bad solution but I consider it=
 overkill.
> > > ...
> > > > Brooks has a varsym port in p4, see //depot/user/brooks/varsym/
> > >=20
> > > this also seems to be based on Dragonfly's code, quite intrusive.
> >=20
> > This code adds one global symbol, one function call in the vfs code,
> > and two pointers to struct proc.  For that we get a system which is
> > significantly more flexible than the NetBSD code.
> >=20
> > While the simplicity of the NetBSD code is somewhat attractive, the
> > fact that variables can not be defined renders it useless for my
> > purposes which are providing partial file system virtulization for
> > computing job/sessions where I need to key off of externally derived job
> > IDs or job specific temporary paths.
>=20
> understood -- it's just that the difference in code size is impressive.
>=20
> Do you know how much of it is used to implement the "varsym"
> subsystem (user- or system-wide variables) and how much is the
> core name translation ?

Most of it is maintaining the lists of variables, handling the system
calls to read and write them, and doing the lookup with the correct
locking context.  The basic match routine is about the same size, though
if you get a hit it's somewhat more expensive since you have to walk up
to three lists (two in what's in p4 at the moment, but I'm currently
splitting the per-proc code into privileged and un-privileged sets to
the administrator can add values to processes that later owners can't
modify) to resolve the variable name.

-- Brooks

--Q0rSlbzrZN6k9QnT
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (FreeBSD)

iD8DBQFIruB+XY6L6fI4GtQRAkFwAKCXdi0z1ZoNaplqAMidj6TE1krRpACfdvMj
/qNldEeHGeZFrUbfRr7hWKs=
=ZEOx
-----END PGP SIGNATURE-----

--Q0rSlbzrZN6k9QnT--



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