[RFC/RFT] calloutng
Bruce Evans
brde at optusnet.com.au
Thu Jan 3 16:55:07 UTC 2013
On Thu, 3 Jan 2013, Alexander Motin wrote:
> On 03.01.2013 16:45, Bruce Evans wrote:
>> On Wed, 2 Jan 2013, Alexander Motin wrote:
>>> More important for scheduling fairness thread's CPU percentage is also
>>> based on hardclock() and hiding from it was trivial before, since all
>>> sleep primitives were strictly aligned to hardclock(). Now it is
>>> slightly less trivial, since this alignment was removed and user-level
>>> APIs provide no easy way to enforce it.
>>
>> %cpu is actually based on statclock(), and not even used for scheduling.
>
> May be for SCHED_4BSD, but not for SCHED_ULE. In SCHED_ULE both %cpu and
> thread priority based on the same ts_ticks counter, that is based on
> hardclock() as time source. Interactivity calculation uses alike logic and
> uses the same time source.
Hmm. I missed this because it hacks on the 'ticks' global. It is clearer
in intermediate versions which use the scheduler API sched_tick(), which
is the hardclock analogue of sched_clock() for statclock. sched_tick() is
now bogus since it is null for all schedulers.
Bruce
More information about the freebsd-arch
mailing list