Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Mar 2013 11:21:56 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        Davide Italiano <davide@FreeBSD.org>, arch@freebsd.org
Subject:   Re: tickless design guidelines
Message-ID:  <5135B934.5060202@FreeBSD.org>
In-Reply-To: <20130305090735.GB18221@onelab2.iet.unipi.it>
References:  <20130305080134.GC13187@onelab2.iet.unipi.it> <5135AFAD.70408@FreeBSD.org> <20130305090735.GB18221@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05.03.2013 11:07, Luigi Rizzo wrote:
> Also i wonder if it may make sense to add a feature so that whenever
> we get an interrupt and a fast and suitable timecounter is available,
> some system-wide bintime is updated.
> 
> So getbinuptime() could just use this counter, becoming extremely
> cheap (perhaps it is already, i am not sure) and in the long term,
> as CPUs with fixed frequency TSC become ubiquitous,
> we would get higher resolution as the interrupt load increases.

Each time timer interrupt fires, or CPU timers "switched" between idle
and active modes present time is fetched. The only question is how to
store it somewhere safely. It was difficult for 96/128-bit struct
bintime. It is easier for 64-bit sbintime_t, but still not all archs are
able to do it atomically. The mechanism used for getbinuptime() now may
not scale well to the very high update rates.

-- 
Alexander Motin



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