Skip to contentSkip to conversation

x86_64: not clear empty_zero_page again

PATCH Applied Yinghai Lu 2 participants 2 messages Jan 3, 2008

Subsystems (2)
lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 x86_64: not clear empty_zero_page again

[PATCH] x86_64: not clear empty_zero_page again

empty_zero_page is in .bss section, and it is cleared in clear_bss by x86_64_start_kernel. So don't clear that again in mem_init

arch/x86/mm/init_64.c +1 -2
Index: linux-2.6/arch/x86/mm/init_64.c
===================================================================
@@ -521,8 +521,7 @@ void __init mem_init(void)
 
 	pci_iommu_alloc();
 
-	/* clear the zero-page */
-	memset(empty_zero_page, 0, PAGE_SIZE);
+	/* clear_bss() already clear the empty_zero_page */
 
 	reservedpages = 0;
 
Applied
#1 lore raw
Quoted 4 lines · Yinghai Lu

[PATCH] x86_64: not clear empty_zero_page again

empty_zero_page is in .bss section, and it is cleared in clear_bss by x86_64_start_kernel. So don't clear that again in mem_init

thanks, applied.

Ingo