Page MenuHomeFreeBSD

taskqueue: Avoid unbounded epoch read sections
ClosedPublic

Authored by markj on Fri, Jul 3, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 22, 2:14 AM
Unknown Object (File)
Thu, Jul 16, 5:23 AM
Unknown Object (File)
Thu, Jul 16, 2:59 AM
Unknown Object (File)
Wed, Jul 15, 7:29 AM
Unknown Object (File)
Wed, Jul 15, 7:29 AM
Unknown Object (File)
Tue, Jul 14, 1:00 PM
Unknown Object (File)
Mon, Jul 13, 8:16 PM
Unknown Object (File)
Mon, Jul 13, 8:10 PM
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