summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-08-07 16:33:15 +0000
committerkib <kib@FreeBSD.org>2013-08-07 16:33:15 +0000
commita3142db9ac39863c9280f1ec60c165e521b66fd3 (patch)
tree65289bf41c6916fca1d735ffb6959aaa84ea7ac6 /sys/amd64/include
parentdbf751d8dcba52ecdbffa7ca29db6f75bc9e2b8b (diff)
downloadFreeBSD-src-a3142db9ac39863c9280f1ec60c165e521b66fd3.zip
FreeBSD-src-a3142db9ac39863c9280f1ec60c165e521b66fd3.tar.gz
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
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/pmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index dc02e49..ebe1780 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -233,6 +233,7 @@ struct pv_chunk;
struct md_page {
TAILQ_HEAD(,pv_entry) pv_list;
+ int pv_gen;
int pat_mode;
};
OpenPOWER on IntegriCloud