From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8a361ea78b8d25f710617b31c2eaf1ec@hamnavoe.com> To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Thu, 12 Nov 2009 21:19:16 +0000 In-Reply-To: <97f3a3e3c85b3c279d6121be7778ef43@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] mmu fix? Topicbox-Message-UUID: 9a3e3f5a-ead5-11e9-9d60-3106f5b1d025 The two cases are: /sys/src/9/pc/mmu.c:510,513 if(didmmuinit) map = xspanalloc(BY2PG, BY2PG, 0); else map = rampage(); xspanalloc returns zeroed memory. rampage is only called early in startup, and returns virgin memory which in the olden days would have been zeroed at boot time. But nowadays: /sys/src/9/pc/memory.c:443 /* memset(va, 0, MB); so damn slow to memset all of memory */ So I think you want to clear the page only for the rampage case.