Page MenuHomeFreeBSD

Use invlpg instead of total invalidation, when setting PG_G.
ClosedPublic

Authored by kib on Dec 4 2015, 8:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 9:49 AM
Unknown Object (File)
Feb 19 2024, 4:54 PM
Unknown Object (File)
Jan 9 2024, 3:12 AM
Unknown Object (File)
Dec 20 2023, 1:10 AM
Unknown Object (File)
Nov 28 2023, 5:02 AM
Unknown Object (File)
Nov 22 2023, 4:40 PM
Unknown Object (File)
Nov 19 2023, 8:08 AM
Unknown Object (File)
Nov 12 2023, 5:55 PM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib retitled this revision from to Use invlpg instead of total invalidation, when setting PG_G..
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added a reviewer: alc.
kib set the repository for this revision to rS FreeBSD src repository - subversion.
kib added subscribers: jhb, cem.
sys/i386/i386/pmap.c
660–661 ↗(On Diff #10722)

Here we'll invalidate 512-1024 pages; is that really cheaper than an invltlb_glob()?

sys/i386/i386/pmap.c
641 ↗(On Diff #10722)

Note that this isn't a critical path, it's only called once during boot, so I'm not sure it's worth optimizing.

sys/i386/i386/pmap.c
641 ↗(On Diff #10722)

Might as well boot as fast as possible.

sys/i386/i386/pmap.c
641 ↗(On Diff #10722)

My issue with this isn't performance, but the logical inconsistency of issuing a PG_G flush when there are no PG_G mappings to flush. Except the ones created on the previous iteration.

660–661 ↗(On Diff #10722)

No, not really, and there is little state in the TLB worth preserving. I'll suggest this line:

invltlb(); /* Flush non-PG_G entries. */

This revision was automatically updated to reflect the committed changes.