]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Change the pmap_ts_referenced() method of amd64 pmap to use shared
authorkib <kib@FreeBSD.org>
Wed, 7 Aug 2013 16:33:15 +0000 (16:33 +0000)
committerkib <kib@FreeBSD.org>
Wed, 7 Aug 2013 16:33:15 +0000 (16:33 +0000)
commita3142db9ac39863c9280f1ec60c165e521b66fd3
tree65289bf41c6916fca1d735ffb6959aaa84ea7ac6
parentdbf751d8dcba52ecdbffa7ca29db6f75bc9e2b8b
Change the pmap_ts_referenced() method of amd64 pmap to use shared
pvh_global_lock.  This allows the method to be executed in parallel,
avoiding undue contention on the pvh_global_lock for the multithreaded
pagedaemon.

The pmap_ts_referenced() function has to inspect the page mappings for
several pmaps, which need to be locked while pv list lock is owned.
This contradicts to the lock order, where pmap lock is before pv list
lock.  Introduce the generation count for the pv list of the page or
superpage, which indicate any change in the pv list, and, as usual,
perform restart of the iteration if generation changed while pv lock
was dropped for blocking acquire of a pmap lock.

Reported and tested by: pho
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
sys/amd64/amd64/pmap.c
sys/amd64/include/pmap.h