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

Details

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