Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jun 1995 14:30:41 -0500 (CDT)
From:      Joe Greco <jgreco@brasil.moneng.mei.com>
To:        davidg@root.com
Cc:        hackers@freebsd.org
Subject:   Re: 2.0.5-A: Very disheartening?
Message-ID:  <199506051930.OAA07820@brasil.moneng.mei.com>
In-Reply-To: <199506051743.KAA07302@corbin.Root.COM> from "David Greenman" at Jun 5, 95 10:43:40 am

next in thread | previous in thread | raw e-mail | index | archive | help
>    Considering the kind of extensive testing that I and others have been doing
> over the last 2 months, and the relative few changes that have been made to
> the kernel (especially in areas that might make a difference in the kind of
> problems that you're seeing), I must conclude that the problem is specific to
> both your configuration and the way that the installation works. I think there
> is some kind of quirk in the kernel gziping and/or compressed MFS that is
> being used in the install process that is causing the problem.
>    I am interested in working with you and others to diagnose and fix the
> problem, but I have very little to go by at the moment. Any information that
> you can provide about your hardware and the steps you took (such as disabling
> or not disabling devices in userconfig, etc.), is escential.

Going back to the message I just sent a few minutes ago:

Well it turns out the test program I hurriedly grabbed was actually meant to
test something somewhat different under Solaris.  But it seems to me that a
compile should not crash a box?  Even if the program is sadistic.  :-)

I dropped a hard disk in and proceeded to get:

wye /kernel: vnode_pager_output: attempt to write meta-data!!! -- 0xfffe9000(ff)

and an understandably long period of thrashing while it compiled the
attached 1500 bytes of code  :-)

Next I mounted the NFS /root and did the compile.. no prob
/tmp and /var/tmp.. no prob
/usr... no prob

and it looks like just about the only thing it's doing locally is... swap.

HMMMM!

Well, that is fascinating.  It suggests an experiment that I will try in a
bit...

... Joe

-------------------------------------------------------------------------------
Joe Greco - Systems Software Engineer, UNIX/Network Hacker, Etc.   414/362-3617
Marquette Electronics, Inc. - R&D - Milwaukee, WI                jgreco@mei.com




#include	<stdio.h>
#include	<unistd.h>
#include	<malloc.h>
#include	<sys/types.h>

#define	MEGABYTES	16

#define	BYTES		MEGABYTES * 1024 * 1024 / sizeof(int)


static int array[MEGABYTES * 1024 * 1024 / sizeof(int) + 8192] = {
0
};

int tweak = 0;

void flipThroughPages(char *addr, unsigned long bytes)
{
	register int pagesize = 4096;
	register int pages = bytes / pagesize;
	register char x;

	if (tweak & 1) {
		pagesize = 256;
	}

	while (pages--) {
		*addr = 0x01;
		addr += pagesize;
	}
}

int inCorePages(char *addr, unsigned long bytes, char *tag)
{
	int i, incore = 0;
	register int pagesize = 4096;
	register int pages = bytes / pagesize;
	char *x;

	if (! (x = (char *)malloc(pages + 1))) {
		fprintf(stderr, "out of memory in inCorePages?\n");
		return(-1);
	}
	if (mincore((caddr_t) addr, (size_t) bytes, x) < 0) {
		perror("mincore");
		free((char *)x);
		return(-1);
	}
	for (i = 0; i < pages; i++) {
		incore += *(x + i) & 0x01;
	}
	free((char *)x);
	printf("%s: inCorePages: %d of %d\n", tag, incore, pages);
	return(0);
}

int main(int argc, char *argv[])
{
	char *ptr;
	int pagesize = 4096;

	if (argc == 2) {
		tweak = atoi(argv[1]);
	}

	/* page align the array */
	ptr = (char *)((((int)array / pagesize) + 1) * pagesize);

	inCorePages((char *)ptr, BYTES, "before running");
	flipThroughPages((char *)ptr, BYTES);
	inCorePages((char *)ptr, BYTES, "after flip");
	while (1) {
		sleep(60);
		inCorePages((char *)ptr, BYTES, "after flip and sleep");
	}
}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506051930.OAA07820>