Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Dec 2013 22:49:23 -0500
From:      Pedro Giffuni <pfg@FreeBSD.org>
To:        Mark Johnston <markj@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff <glebius@FreeBSD.org>, Mike Ma <mikemandarine@gmail.com>, src-committers@freebsd.org
Subject:   Re: svn commit: r260091 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace
Message-ID:  <BE9E80D8-33E5-43AF-9D21-123BF5544A97@FreeBSD.org>
In-Reply-To: <20131231032845.GB11997@charmander.home>
References:  <201312301737.rBUHbW3I035088@svn.freebsd.org> <20131230204210.GD71033@FreeBSD.org> <20131231023952.GA11997@charmander.home> <7A335B4A-D986-4E6E-8D8B-22E7E7991A75@FreeBSD.org> <20131231032845.GB11997@charmander.home>

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

Il giorno 30/dic/2013, alle ore 22:28, Mark Johnston <markj@freebsd.org> =
ha scritto:

> On Mon, Dec 30, 2013 at 10:21:58PM -0500, Pedro Giffuni wrote:
>>=20
>> Il giorno 30/dic/2013, alle ore 21:40, Mark Johnston =
<markj@freebsd.org> ha scritto:
>>=20
>>> On Tue, Dec 31, 2013 at 12:42:10AM +0400, Gleb Smirnoff wrote:
>>>> On Mon, Dec 30, 2013 at 05:37:32PM +0000, Mark Johnston wrote:
>>>> M> Author: markj
>>>> M> Date: Mon Dec 30 17:37:32 2013
>>>> M> New Revision: 260091
>>>> M> URL: http://svnweb.freebsd.org/changeset/base/260091
>>>> M>=20
>>>> M> Log:
>>>> M>   Now that vmem(9) is available, use vmem arenas to allocate =
probe and
>>>> M>   aggregation IDs, as is done in the upstream illumos code. This =
still
>>>> M>   requires some FreeBSD-specific code, as our vmem API is not =
identical to the
>>>> M>   one in illumos.
>>>> M>  =20
>>>> M>   Submitted by:	Mike Ma <mikemandarine@gmail.com>
>>>>=20
>>>> IMHO, alloc_unr() was lighter and thus better for allocating just =
IDs.
>>>=20
>>> That's true; I committed the change since it helps keep our code =
similar
>>> to upstream and, as Pedro notes, it was a long-standing todo item on =
the
>>> wiki. After doing some testing, it looks like vmem is a bit slower:
>>> process startup is on the order of tenths of milliseconds longer =
with
>>> this change, for executables containing one USDT probe (since such
>>> probes are allocated during process startup).
>>>=20
>>> So probably the right thing to do is revert this change. It doesn't
>>> actually reduce the upstream diff as much as I'd hoped, anyway.
>>>=20
>>=20
>> Since it is our option to decide, perhaps just keep the vmem version =
as reference and #ifdef FreeBSD alloc_unr() ?
>=20
> You mean just having
>=20
> #if defined(sun)
> vmem code
> #else
> *_unr code
> #endif
>=20
> ? That's what we'd get by reverting the change.


Rather=20
#ifdef __FreeBSD__
*_unr code
#else
vmem code (FreeBSD variant)
#endif

Not much different, but if we are going to keep dead code let=92s keep =
at least code that is known to work ;)

Pedro.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BE9E80D8-33E5-43AF-9D21-123BF5544A97>