Page MenuHomeFreeBSD

taskqueue: Avoid unbounded epoch read sections
ClosedPublic

Authored by markj on Jul 3 2026, 7:58 PM.
Tags
None
Referenced Files
F167635681: D58031.diff
Sun, Aug 23, 9:21 AM
Unknown Object (File)
Sat, Aug 22, 10:41 AM
Unknown Object (File)
Fri, Aug 21, 3:39 PM
Unknown Object (File)
Fri, Aug 21, 6:40 AM
Unknown Object (File)
Wed, Aug 19, 4:58 PM
Unknown Object (File)
Wed, Aug 19, 7:26 AM
Unknown Object (File)
Tue, Aug 18, 5:52 AM
Unknown Object (File)
Mon, Aug 17, 9:17 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