From a3142db9ac39863c9280f1ec60c165e521b66fd3 Mon Sep 17 00:00:00 2001 From: kib Date: Wed, 7 Aug 2013 16:33:15 +0000 Subject: 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/include/pmap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/amd64/include') 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; }; -- cgit v1.1