Re: git: e3cbc572f154 - main - kern/subr_trap.c: repair the HPTS performance hack in userret()

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Mon, 04 Dec 2023 20:27:00 UTC
On Mon, Dec 04, 2023 at 06:59:31PM +0000, Gleb Smirnoff wrote:
> The branch main has been updated by glebius:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=e3cbc572f1541fdc18be9971d23e210d5018e662
> 
> commit e3cbc572f1541fdc18be9971d23e210d5018e662
> Author:     Gleb Smirnoff <glebius@FreeBSD.org>
> AuthorDate: 2023-12-04 18:19:46 +0000
> Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
> CommitDate: 2023-12-04 18:19:46 +0000
> 
>     kern/subr_trap.c: repair the HPTS performance hack in userret()
>     
>     It wasn't functional as subr_trap.c doesn't include opt_inet.h.  Put a
>     better comment provided by gallatin@ in place of the old one.  The idea
>     is to use userret() as a cheap place to call a soft clock.  This approach
>     saves CPU on busy machines and saves power on idle machines.
>     An alternative would be to constantly schedule callouts.  Running with
>     neither callouts nor the soft clock ruins HPTS precision.
Can this be converted to AST, and scheduled as needed, instead of current
ugliness?