kern/subr_trap.c: repair the HPTS performance hack in userret()
authorGleb Smirnoff <glebius@FreeBSD.org>
Mon, 4 Dec 2023 18:19:46 +0000 (10:19 -0800)
committerGleb Smirnoff <glebius@FreeBSD.org>
Mon, 4 Dec 2023 18:19:46 +0000 (10:19 -0800)
commite3cbc572f1541fdc18be9971d23e210d5018e662
tree79224bf5034366c97f7e1b2ba15ff020e25afd33
parent2c6fc36a0ddd4d741e2c206855d2dff9b008005a
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.

Reviewed by: tuexen, rrs
Differential Revision: https://reviews.freebsd.org/D42860
sys/kern/subr_trap.c
sys/netinet/tcp_hpts.h
sys/netinet/tcp_lro.c
sys/sys/systm.h