diff options
| author | R. Christian McDonald <rcm@FreeBSD.org> | 2026-10-14 00:16:35 +0000 |
|---|---|---|
| committer | R. Christian McDonald <rcm@FreeBSD.org> | 2026-10-14 00:16:55 +0000 |
| commit | fe90f180047bc2cb4d15d4a31033741add5f5d10 (patch) | |
| tree | e1f3785f7125780edd601e3885e8e5ac30969163 /lib/CodeGen | |
| parent | 34e92fb6bd8da6569c90ae9ee79c9a01890b8a6b (diff) | |
epoch_drain_callbacks() bound the calling thread to each CPU in turn
to queue a callback on that CPU's record. Callers are often user
threads, such as kldunload or ifconfig destroy, and ULE does not
preempt a CPU-bound thread for a migrating thread of no better
priority, so each bind could wait out a time slice. On an 8-CPU VM
with six busy loops running, destroying an epair interface took 1.5 s
and kldunload pflow 0.8 s.
Instead, set a request flag on each record and enqueue that CPU's
callback task, which queues the callback before it polls the record.
The task runs on the CPU's softirq gtaskqueue thread at PI_SOFT, which
preempts a busy user thread, so the request is served at once; the
caller no longer migrates. Both operations now take under 10 ms, idle
or under load.
Reviewed by: markj
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D60646
Diffstat (limited to 'lib/CodeGen')
0 files changed, 0 insertions, 0 deletions
