Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jun 2012 07:28:09 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Gianni <gianni@FreeBSD.org>, Alan Cox <alc@rice.edu>, Alexander Kabaev <kan@FreeBSD.org>, Attilio Rao <attilio@FreeBSD.org>, Konstantin Belousov <kib@FreeBSD.org>, freebsd-arch@FreeBSD.org
Subject:   Re: Fwd: [RFC] Kernel shared variables
Message-ID:  <20120603063330.H3418@besplex.bde.org>
In-Reply-To: <20120602171632.GC2358@deviant.kiev.zoral.com.ua>
References:  <CACfq090r1tWhuDkxdSZ24fwafbVKU0yduu1yV2%2BoYo%2BwwT4ipA@mail.gmail.com> <20120601193522.GA2358@deviant.kiev.zoral.com.ua> <CAJ-FndC71=3Jo%2BBxQi==gCoLipBxj8X8XMBydjvrcKeGw%2BWOnA@mail.gmail.com> <20120602164847.GB2358@deviant.kiev.zoral.com.ua> <CAJ-FndAXFwuEspq%2BQeF0Hv1dr8JjREP=c=g3-abP=eoZ-D4hEg@mail.gmail.com> <CAJ-FndCpztSWyJo2hRVs5qu%2BvQOj9E1mPBhfVOxM_OC2eNac6A@mail.gmail.com> <20120602171632.GC2358@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2 Jun 2012, Konstantin Belousov wrote:

> On Sat, Jun 02, 2012 at 06:00:06PM +0100, Attilio Rao wrote:
>> ...
>> 2012/6/2 Konstantin Belousov <kostikbel@gmail.com>:
>>> On Sat, Jun 02, 2012 at 02:01:35PM +0100, Attilio Rao wrote:
> [Tried to trim the text]

[Trimmed more]

>>> Right, exactly, and this is why I object to the "offsets" approach.
>>> It basically moves us to the old times of the "jump tables" shared
>>> libraries, that fortunately was never a case for FreeBSD even when
>>> a.out was used.
>>
>> I'm objecting to this either.
> My english is not good enough to understand this. Do you agree or disagree
> with my statement that 'indexes' make it very hard to maintain ABI ?

Syscall numbers are basically indexes, and work OK (because there aren't
many of them even after ~30-35 years of accumulating them).

> ...
>> The gettimeofday() implementation is a different story than what is asked here.
>
> But the goal is to have fast clocks, right ? What else is planned ?
>
> In fact, I think that if the whole goal is only fast clocks, then we
> do not need any additional system mechanisms, since we can easily export
> coefficients for rdtsc formula already. E.g. we can put it into elf auxv,
> which is ugly but bearable.

How do you get the timehands offsets?  These only need to be updated
every second or so, or when used, but how can the application know
when they need to be updated if this is not done automatically in the
kernel by writing to a shared page?  I can only think of the
application arranging an alarm signal every second or so and updating
then.  No good for libraries.

rdtsc is also very unportable, even on CPUs that have it.  But all other
x86 timecounter hardware is too slow if you want gettimeofday() to be fast
and as accurate as it is now.

Bruce



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