From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sun, 29 Nov 2009 17:34:55 -0500 To: 9fans@9fans.net Message-ID: In-Reply-To: <<13426df10911291403m64599f85mfcc91325b63a661@mail.gmail.com>> References: <<13426df10911291403m64599f85mfcc91325b63a661@mail.gmail.com>> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] strangeness on a server Topicbox-Message-UUID: a4e33460-ead5-11e9-9d60-3106f5b1d025 > 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;