Page MenuHomeFreeBSD

powerpc64/pmap: Reduce scope of PV_LOCK in remove path
ClosedPublic

Authored by jhibbits on Jun 19 2019, 12:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 2 2024, 6:25 PM
Unknown Object (File)
Mar 31 2024, 1:54 PM
Unknown Object (File)
Feb 10 2024, 1:37 AM
Unknown Object (File)
Feb 2 2024, 12:53 AM
Unknown Object (File)
Jan 19 2024, 5:04 AM
Unknown Object (File)
Jan 15 2024, 2:59 PM
Unknown Object (File)
Jan 15 2024, 1:54 PM
Unknown Object (File)
Dec 23 2023, 4:32 AM
Subscribers

Details

Summary

Since the 'page pv' lock is one of the most highly contended locks, we
need to try to do as much work outside of the lock as we can. The
moea64_pvo_remove_from_page() path is a low hanging fruit, where we can
do some heavy work (PHYS_TO_VM_PAGE()) outside of the lock if needed.
In one path, moea64_remove_all(), the PV lock is already held and can't
be swizzled, so we provide two ways to perform the locked operation, one
that can call PHYS_TO_VM_PAGE outside the lock, and one that calls with
the lock already held.

Diff Detail

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

Event Timeline

Looks good to me; do you know how much this actually helps?

This revision is now accepted and ready to land.Jun 19 2019, 11:46 AM

Looks good to me; do you know how much this actually helps?

Not much, unfortunately. Might give us a ~1-2% improvement on buildworld, but that's it. We really need to relook at moea64_enter(). The page pv lock is held way too long in there, and there's a lot of contention on it when a single page is mapped into multiple pmaps. Can you take a look at that bit? My naiive approach to fixin gmoea64_enter() seemed to make things significantly worse instead.