Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177548134
D61414.1794683032.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61414.1794683032.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
@@ -6394,6 +6394,8 @@
MPASS(pmap != kernel_pmap); /* XXXKIB */
MPASS((*pdpe & (PG_MANAGED | PG_G)) == 0);
anyvalid = 1;
+ if ((*pdpe & PG_W) != 0)
+ pmap->pm_stats.wired_count -= NBPDP / PAGE_SIZE;
*pdpe = 0;
pmap_resident_count_adj(pmap, -NBPDP / PAGE_SIZE);
mt = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, sva) & PG_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
@@ -4598,6 +4598,9 @@
pmap_load(l1), sva, eva, va_next));
MPASS(pmap != kernel_pmap);
MPASS((pmap_load(l1) & ATTR_SW_MANAGED) == 0);
+ if ((pmap_load(l1) & ATTR_SW_WIRED) != 0)
+ pmap->pm_stats.wired_count -=
+ L1_SIZE / PAGE_SIZE;
pmap_clear(l1);
pmap_s1_invalidate_page(pmap, sva, true, TLBI_TTL_L1);
pmap_resident_count_dec(pmap, L1_SIZE / PAGE_SIZE);
diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -4069,6 +4069,8 @@
panic("pmap_unwire: l2 %#jx is missing "
"PTE_SW_WIRED", (uintmax_t)l2e);
pmap_clear_bits(l2, PTE_SW_WIRED);
+ pmap->pm_stats.wired_count -= L2_SIZE /
+ PAGE_SIZE;
continue;
} else {
if (!pv_lists_locked) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 7:03 PM (1 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41694741
Default Alt Text
D61414.1794683032.diff (1 KB)
Attached To
Mode
D61414: pmap: Fix accounting of wired mappings of large pages
Attached
Detach File
Event Timeline