9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <9fans@hamnavoe.com>
To: 9fans@9fans.net
Subject: Re: [9fans] mmu fix?
Date: Thu, 12 Nov 2009 21:19:16 +0000	[thread overview]
Message-ID: <8a361ea78b8d25f710617b31c2eaf1ec@hamnavoe.com> (raw)
In-Reply-To: <97f3a3e3c85b3c279d6121be7778ef43@coraid.com>

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.




  reply	other threads:[~2009-11-12 21:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 20:57 erik quanstrom
2009-11-12 21:19 ` Richard Miller [this message]
     [not found] <<8a361ea78b8d25f710617b31c2eaf1ec@hamnavoe.com>
2009-11-12 21:34 ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a361ea78b8d25f710617b31c2eaf1ec@hamnavoe.com \
    --to=9fans@hamnavoe.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).