Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112773867
D49442.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
919 B
Referenced Files
None
Subscribers
None
D49442.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
@@ -9292,6 +9292,11 @@
va = va_next;
for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++,
sva += PAGE_SIZE) {
+ /*
+ * Avoid clearing the accessed bit for wired mappings.
+ * Superpage demotion assumes that a wired mapping is
+ * always accessed.
+ */
if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | PG_V))
goto maybe_invlrng;
else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) {
@@ -9304,8 +9309,9 @@
m = PHYS_TO_VM_PAGE(*pte & PG_FRAME);
vm_page_dirty(m);
}
- atomic_clear_long(pte, PG_M | PG_A);
- } else if ((*pte & PG_A) != 0)
+ atomic_clear_long(pte, PG_M |
+ ((*pte & PG_W) == 0 ? PG_A : 0));
+ } else if ((*pte & (PG_A | PG_W)) == PG_A)
atomic_clear_long(pte, PG_A);
else
goto maybe_invlrng;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 23, 2:47 PM (2 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17256709
Default Alt Text
D49442.diff (919 B)
Attached To
Mode
D49442: pmap: Avoid clearing the accessed bit for wired mappings
Attached
Detach File
Event Timeline
Log In to Comment