Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107859732
D45085.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D45085.diff
View Options
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h
--- a/sys/amd64/include/vmparam.h
+++ b/sys/amd64/include/vmparam.h
@@ -294,7 +294,8 @@
/*
* Need a page dump array for minidump.
*/
-#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 1
#endif /* _MACHINE_VMPARAM_H_ */
diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h
--- a/sys/arm/include/vmparam.h
+++ b/sys/arm/include/vmparam.h
@@ -200,5 +200,6 @@
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 0
#endif /* _MACHINE_VMPARAM_H_ */
diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h
--- a/sys/arm64/include/vmparam.h
+++ b/sys/arm64/include/vmparam.h
@@ -317,6 +317,7 @@
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 1
#endif /* !_MACHINE_VMPARAM_H_ */
diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h
--- a/sys/i386/include/vmparam.h
+++ b/sys/i386/include/vmparam.h
@@ -246,5 +246,6 @@
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 0
#endif /* _MACHINE_VMPARAM_H_ */
diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h
--- a/sys/powerpc/include/vmparam.h
+++ b/sys/powerpc/include/vmparam.h
@@ -308,11 +308,13 @@
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 1
#else
/*
* No minidump with 32-bit powerpc.
*/
#define MINIDUMP_PAGE_TRACKING 0
+#define MINIDUMP_STARTUP_PAGE_TRACKING 0
#endif
#define PMAP_HAS_DMAP (hw_direct_map)
diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h
--- a/sys/riscv/include/vmparam.h
+++ b/sys/riscv/include/vmparam.h
@@ -257,5 +257,6 @@
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 1
#endif /* !_MACHINE_VMPARAM_H_ */
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1890,8 +1890,7 @@
pa = VM_PAGE_TO_PHYS(m);
for (i = 0; i < pages; i++, pa += PAGE_SIZE) {
-#if defined(__aarch64__) || defined(__amd64__) || \
- defined(__riscv) || defined(__powerpc64__)
+#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING
if ((wait & M_NODUMP) == 0)
dump_add_page(pa);
#endif
@@ -1918,8 +1917,7 @@
if (va >= bootstart && va + bytes <= bootmem)
pmap_remove(kernel_pmap, va, va + bytes);
for (; bytes != 0; bytes -= PAGE_SIZE, m++) {
-#if defined(__aarch64__) || defined(__amd64__) || \
- defined(__riscv) || defined(__powerpc64__)
+#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING
dump_drop_page(VM_PAGE_TO_PHYS(m));
#endif
vm_page_unwire_noq(m);
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -620,11 +620,7 @@
vm_page_dump = (void *)(uintptr_t)pmap_map(&vaddr, new_end,
new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE);
bzero((void *)vm_page_dump, vm_page_dump_size);
-#else
- (void)last_pa;
-#endif
-#if defined(__aarch64__) || defined(__amd64__) || \
- defined(__riscv) || defined(__powerpc64__)
+#if MINIDUMP_STARTUP_PAGE_TRACKING
/*
* Include the UMA bootstrap pages, witness pages and vm_page_dump
* in a crash dump. When pmap_map() uses the direct map, they are
@@ -632,6 +628,9 @@
*/
for (pa = new_end; pa < end; pa += PAGE_SIZE)
dump_add_page(pa);
+#endif
+#else
+ (void)last_pa;
#endif
phys_avail[biggestone + 1] = new_end;
#ifdef __amd64__
@@ -728,8 +727,7 @@
*/
new_end = vm_reserv_startup(&vaddr, new_end);
#endif
-#if defined(__aarch64__) || defined(__amd64__) || \
- defined(__riscv) || defined(__powerpc64__)
+#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING
/*
* Include vm_page_array and vm_reserv_array in a crash dump.
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 7:08 PM (18 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15955770
Default Alt Text
D45085.diff (3 KB)
Attached To
Mode
D45085: vm: simplify conditional for dumping startup pages
Attached
Detach File
Event Timeline
Log In to Comment