HomeFreeBSD

vlapic: Schedule callouts on the local CPU

Description

vlapic: Schedule callouts on the local CPU

The virtual LAPIC driver uses callouts to implement the LAPIC timer.
Callouts are armed using callout_reset_sbt(), which currently puts
everything on CPU 0. On systems running many bhyve VMs this results in
a large amount of contention for CPU 0's callout lock.

Modify vlapic to schedule callouts on the local CPU instead. This
allows timer interrupts to be scheduled more evenly among CPUs where
bhyve is running.

Reviewed by: grehan, jhb
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 4c812fe61b7ce2f297a381950ff7bd87fd51f698)

Details

Provenance
markjAuthored on Oct 20 2021, 12:50 AM
Parents
rGb5e502026085: rmslock: Update td_locks during lock and unlock operations
Branches
Unknown
Tags
Unknown