9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] strangeness on a server
Date: Sun, 29 Nov 2009 17:34:55 -0500	[thread overview]
Message-ID: <f3005ad67a9d9b1e953d29565c31fa40@ladd.quanstro.net> (raw)
In-Reply-To: <<13426df10911291403m64599f85mfcc91325b63a661@mail.gmail.com>>

> one thing that I don't understand: when it starts up I get a line like this:
> mem -1 bcmem 0 icmem 0
>
> Does this point to misconfiguration or will venti do something reasonable here?

it looks like a little bit of misconfiguration, which the current
code makes too easy.  i'm not sure this is the root cause of
your problems.  since venti also does a big dance to try to make
memory misconfiguration non-fatal.

did you upgrade the hardware?  i have some tricks in
9atom (source ftp://ftp.quanstro.net/other/kernel.mkfs.bz2)
in particular, /dev/irqalloc has an extra field that will tell you
how many interrupts a particular vector has taken.  this
can be useful in narrowing down the guilty parties.

- erik

/n/dump/2009/1129/sys/src/cmd/venti/srv/venti.c:54,59 - /sys/src/cmd/venti/srv/venti.c:54,70
  }

  void
+ minmem(u32int *mem, u32int *icmem, u32int *bcmem)
+ {
+ 	if ((int)*icmem < 6 * 1024 * 1024)
+ 		*icmem = 6 * 1024 * 1024;
+ 	if ((int)*mem < 1 * 1024 * 1024)		/* lumps */
+ 		*mem = 1 * 1024 * 1024;
+ 	if ((int)*bcmem < 2 * 1024 * 1024)
+ 		*bcmem = 2 * 1024 * 1024;
+ }
+
+ void
  usage(void)
  {
  	fprint(2, "usage: venti [-Ldrsw] [-a ventiaddr] [-c config] "
/n/dump/2009/1129/sys/src/cmd/venti/srv/venti.c:184,195 - /sys/src/cmd/venti/srv/venti.c:195,201
  			mem = avail;
  			bcmem = 2 * avail;
  		}
- 		if (icmem < 6 * 1024 * 1024)
- 			icmem = 6 * 1024 * 1024;
- 		if (mem < 1 * 1024 * 1024)		/* lumps */
- 			mem = 1 * 1024 * 1024;
- 		if (bcmem < 2 * 1024 * 1024)
- 			bcmem = 2 * 1024 * 1024;
+ 		minmem(&mem, &icmem, &bcmem);
  		config.mem = mem;
  		config.bcmem = bcmem;
  		config.icmem = icmem;
/n/dump/2009/1129/sys/src/cmd/venti/srv/venti.c:201,207 - /sys/src/cmd/venti/srv/venti.c:207,214
  		bcmem = config.bcmem;
  	if(icmem == 0)
  		icmem = config.icmem;
- 	fprint(2, "%s: mem %d bcmem %d icmem %d...", argv0, mem, bcmem, icmem);
+ 	minmem(&mem, &icmem, &bcmem);
+ 	fprint(2, "%s: mem %ud bcmem %ud icmem %ud...", argv0, mem, bcmem, icmem);

  	if(haddr == nil)
  		haddr = config.haddr;



       reply	other threads:[~2009-11-29 22:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<13426df10911291403m64599f85mfcc91325b63a661@mail.gmail.com>
2009-11-29 22:34 ` erik quanstrom [this message]
2009-11-29 23:08   ` ron minnich
     [not found] <<13426df10911291508n197d48b8ia9276c094f16a7d7@mail.gmail.com>
2009-11-30  1:07 ` erik quanstrom
2009-11-29 22:03 ron minnich

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=f3005ad67a9d9b1e953d29565c31fa40@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --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).