Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Jun 2022 08:25:49 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, hackers@freebsd.org
Subject:   Re: pps_capture() and pps_fetch()
Message-ID:  <202206080825.2588PnVl065319@critter.freebsd.dk>
In-Reply-To: <8ced022c-518a-4a77-135f-37d58cde27e7@embedded-brains.de>
References:  <5b8310db-c94b-709f-8c57-bec2d413a80f@embedded-brains.de> <202206010725.2517PEfF036703@critter.freebsd.dk> <e1093df0-c719-0421-3e96-c6d7df861a51@embedded-brains.de> <YphDlMyWxDWvJo5Q@kib.kiev.ua> <c4fe6a08-24b6-522e-3963-cf03eb994496@embedded-brains.de> <202206030828.2538ScDg080165@critter.freebsd.dk> <35d4d55c-ff62-cff7-cdbf-ea2549dee86c@embedded-brains.de> <202206031847.253Il6Y2082105@critter.freebsd.dk> <8ced022c-518a-4a77-135f-37d58cde27e7@embedded-brains.de>

next in thread | previous in thread | raw e-mail | index | archive | help
--------
Sebastian Huber writes:

> 		tc_min_ticktock_freq =3D max(1, tc->tc_frequency /
> 		    (((uint64_t)tc->tc_counter_mask + 1) / 3));
>
> code in tc_windup(). I don't understand the value "3" here, I guess it
> should depend on timehands_count?

Not really.

The divide by three is holding a good distance to the half-way mark, so
that we "wind" to the next hand before the roll-over introduces s
ambiguity.

The number of timehands relate to how bad latency (interrupt and
scheduling) can be for kernel threads.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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