HomeFreeBSD

Do not read timer extra time when MWAIT is used.

Description

Do not read timer extra time when MWAIT is used.

When we enter C2+ state via memory read, it may take chipset some
time to stop CPU. Extra register read covers that time. But MWAIT
makes CPU stop immediately, so we don't need to waste time after
wakeup with interrupts still disabled, increasing latency.

On my system it reduces ping localhost latency, waking up all CPUs
once a second, from 277us to 242us.

MFC after: 1 month

(cherry picked from commit 075e4807df3e6b0d9196d56e4dbc33765d57e1f8)

Details

Provenance
mavAuthored on Mar 8 2021, 11:43 PM
Parents
rG9c27e7141b74: Change mwait_bm_avoidance use to match Linux.
Branches
Unknown
Tags
Unknown