]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Change mwait_bm_avoidance use to match Linux.
authorAlexander Motin <mav@FreeBSD.org>
Mon, 8 Mar 2021 22:57:46 +0000 (17:57 -0500)
committerAlexander Motin <mav@FreeBSD.org>
Wed, 7 Apr 2021 00:30:23 +0000 (20:30 -0400)
commit9c27e7141b749d68d9fee68e5fb44413765265e2
treef1f7f90ab32a5f3afa180b8ff7ae7d132f068b56
parent3ae17faa370491d7ce1fcfc4d5b9cd1ed0117b67
Change mwait_bm_avoidance use to match Linux.

Even though the information is very limited, it seems the intent of
this flag is to control ACPI_BITREG_BUS_MASTER_STATUS use for C3,
not force ACPI_BITREG_ARB_DISABLE manipulations for C2, where it was
never needed, and which register not really doing anything for years.
It wasted lots of CPU time on congested global ACPI hardware lock
when many CPU cores were trying to enter/exit deep C-states same time.

On idle 80-core system it pushed ping localhost latency up to 20ms,
since badport_bandlim() via counter_ratecheck() wakes up all CPUs
same time once a second just to synchronously reset the counters.
Now enabling C-states increases the latency from 0.1 to just 0.25ms.

Discussed with: kib
MFC after: 1 month

(cherry picked from commit 455219675dbd61010e180cacdfed51e7e34111e1)
sys/dev/acpica/acpi_cpu.c