Page MenuHomeFreeBSD

taskqueue: Avoid unbounded epoch read sections
ClosedPublic

Authored by markj on Jul 3 2026, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 9, 9:22 AM
Unknown Object (File)
Sun, Aug 9, 9:08 AM
Unknown Object (File)
Sun, Aug 9, 7:01 AM
Unknown Object (File)
Sun, Aug 9, 5:13 AM
Unknown Object (File)
Sun, Aug 9, 4:32 AM
Unknown Object (File)
Sat, Aug 8, 9:44 PM
Unknown Object (File)
Fri, Aug 7, 7:12 PM
Unknown Object (File)
Wed, Jul 29, 9:41 AM
Subscribers

Details

Summary

The taskqueue thread loop tries to avoid entering and exiting net epoch
read sections for every task. This reduces the overhead of net epoch
integration, but the implementation wasn't bounding the length of the
read section, so a busy taskqueue thread could hold an epoch open for an
unbounded period. This is easy to achieve with the epair task, for
instance.

Bound the number of tasks that we'll execute without observing the
global epoch, and provide a sysctl to control it. Let the default bound
be eight.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable