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
F81630649: D20694.id.diff
Fri, Apr 19, 6:21 AM
Unknown Object (File)
Thu, Apr 18, 7:05 AM
Unknown Object (File)
Tue, Apr 16, 11:23 AM
Unknown Object (File)
Thu, Apr 11, 4:20 AM
Unknown Object (File)
Tue, Apr 9, 7:56 PM
Unknown Object (File)
Tue, Apr 2, 6:25 PM
Unknown Object (File)
Sun, Mar 31, 1:54 PM
Unknown Object (File)
Feb 10 2024, 1:37 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.