FreeBSD Bugzilla – Attachment 151655 Details for
Bug 196650
[PATCH] Display progress during getmemsize() so the kernel doesn't look like it hanged
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Display progress when mapping in memory
getmemsize-progress-10.patch (text/plain), 1.43 KB, created by
Ravi Pokala
on 2015-01-15 06:51:16 UTC
(
hide
)
Description:
Display progress when mapping in memory
Filename:
MIME Type:
Creator:
Ravi Pokala
Created:
2015-01-15 06:51:16 UTC
Size:
1.43 KB
patch
obsolete
>Index: sys/amd64/amd64/machdep.c >=================================================================== >--- sys/amd64/amd64/machdep.c (revision 277210) >+++ sys/amd64/amd64/machdep.c (working copy) >@@ -1521,6 +1521,8 @@ > SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, > "System firmware boot method"); > >+#define PAGES_PER_GB (1024 * 1024 * 1024 / PAGE_SIZE) >+ > /* > * Populate the (physmap) array with base/bound pairs describing the > * available physical memory in the system, then test this memory and >@@ -1541,6 +1543,7 @@ > struct bios_smap *smapbase; > struct efi_map_header *efihdr; > quad_t dcons_addr, dcons_size; >+ int page_counter; > > bzero(physmap, sizeof(physmap)); > basemem = 0; >@@ -1651,6 +1654,9 @@ > * physmap is in bytes, so when converting to page boundaries, > * round up the start address and round down the end address. > */ >+ page_counter = 0; >+ if (memtest != 0) >+ printf("Testing system memory"); > for (i = 0; i <= physmap_idx; i += 2) { > vm_paddr_t end; > >@@ -1681,6 +1687,14 @@ > goto skip_memtest; > > /* >+ * Print a "." every GB to show we're making >+ * progress. >+ */ >+ page_counter++; >+ if ((page_counter % PAGES_PER_GB) == 0) >+ printf("."); >+ >+ /* > * map page into kernel: valid, read/write,non-cacheable > */ > *pte = pa | PG_V | PG_RW | PG_NC_PWT | PG_NC_PCD; >@@ -1767,6 +1781,8 @@ > } > *pte = 0; > invltlb(); >+ if (memtest != 0) >+ printf("\n"); > > /* > * XXX
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 196650
: 151655