]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r368649 / 3fd989da by kib: amd64 pmap: fix PCID mode invalidations
authorAndriy Gapon <avg@FreeBSD.org>
Tue, 14 Dec 2021 14:43:29 +0000 (16:43 +0200)
committerEd Maste <emaste@FreeBSD.org>
Mon, 10 Jan 2022 00:43:13 +0000 (19:43 -0500)
commitb8beb716be3d07b3918792e5759f91552fa527d5
tree11737f02c1cea9f942249d11277caa3093e5ed67
parentd5f4d9d5245813f89a64ec6f84eebc025f3e9df9
MFC r368649 / 3fd989da by kib: amd64 pmap: fix PCID mode invalidations

r368649 fixed a regression in r362031 that was MFC-ed to stable/12 as
a part of r362572.  That commit reordered IPI send and local TLB flush in
TLB invalidations.

Without this fix we've been seeing problems with stale memory content
where changes done under a mutex were not immediately observed by
another thread after taking the same mutex.  Those inconsistenices were
correlated to copy-on-write faults for pages contaning the data.

The change needed some adaptations as I elected to skip two significant
intermediate changes:
- r363195 / dc43978a, amd64: allow parallel shootdown IPIs
- r363311 / 3ec7e169, amd64 pmap: microoptimize local shootdowns for
  PCID PTI configurations

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D33413

(cherry picked from commit 1820ca2154611d6f27ce5a5fdd561a16ac54fdd8)

Approved by: so
Errata: FreeBSD-EN-22:04.pcid
sys/amd64/amd64/pmap.c
sys/x86/x86/mp_x86.c