Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115912163
D31161.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31161.diff
View Options
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -8201,6 +8201,16 @@
continue;
}
+ /* Mark free */
+ pc->pc_map[field] |= bitmask;
+
+ /*
+ * Because this pmap is not active on other
+ * processors, the dirty bit cannot have
+ * changed state since we last loaded pte.
+ */
+ pte_clear(pte);
+
if (superpage)
pa = tpte & PG_PS_FRAME;
else
@@ -8217,8 +8227,6 @@
("pmap_remove_pages: bad tpte %#jx",
(uintmax_t)tpte));
- pte_clear(pte);
-
/*
* Update the vm_page_t clean/reference bits.
*/
@@ -8232,8 +8240,6 @@
CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m);
- /* Mark free */
- pc->pc_map[field] |= bitmask;
if (superpage) {
pmap_resident_count_adj(pmap, -NBPDR / PAGE_SIZE);
pvh = pa_to_pvh(tpte & PG_PS_FRAME);
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -4951,6 +4951,16 @@
continue;
}
+ /* Mark free */
+ pc->pc_map[field] |= bitmask;
+
+ /*
+ * Because this pmap is not active on other
+ * processors, the dirty bit cannot have
+ * changed state since we last loaded pte.
+ */
+ pmap_clear(pte);
+
pa = tpte & ~ATTR_MASK;
m = PHYS_TO_VM_PAGE(pa);
@@ -4964,13 +4974,6 @@
("pmap_remove_pages: bad pte %#jx",
(uintmax_t)tpte));
- /*
- * Because this pmap is not active on other
- * processors, the dirty bit cannot have
- * changed state since we last loaded pte.
- */
- pmap_clear(pte);
-
/*
* Update the vm_page_t clean/reference bits.
*/
@@ -4988,8 +4991,6 @@
CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m);
- /* Mark free */
- pc->pc_map[field] |= bitmask;
switch (lvl) {
case 1:
pmap_resident_count_dec(pmap,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 8:05 AM (12 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17877058
Default Alt Text
D31161.diff (1 KB)
Attached To
Mode
D31161: Micro-optimize pmap_remove_pages() on amd64 and arm64
Attached
Detach File
Event Timeline
Log In to Comment