Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 2004 14:04:12 -0700 (PDT)
From:      Doug White <dwhite@gumbysoft.com>
To:        current@freebsd.org
Subject:   src/sys/vm/vm_init.c v1.43 hangs amd64
Message-ID:  <20040430135155.C67990@carver.gumbysoft.com>

next in thread | raw e-mail | index | archive | help
Hello,

I've been having problems with adm64 hanging under load on my dual opteron
244 machine. Its a HDAMA mainboard with 2GB RAM.  The problems started
around April 8.  I finally found some time this week to narrow down the
commit that causes the breakage; its rev 1.43 of src/sys/vm/vm_init.c.

Whats really wierd and creepy is that I can fix the hang by adding 0 to
the size argument of a kmem_suballoc() call. This leads me to think
there's a gcc bug creeping around here somewhere.

In rev 1.42, line 192 of src/sys/vm/vm_init.c looks like this:

        pager_map = kmem_suballoc(clean_map, &kmi->pager_sva, &kmi->pager_eva,
                                (nswbuf*MAXPHYS) + pager_map_size);

rev 1.43 looks like this:

        pager_map = kmem_suballoc(clean_map, &kmi->pager_sva, &kmi->pager_eva,
                                (nswbuf*MAXPHYS));

If I change this line to:

        pager_map = kmem_suballoc(clean_map, &kmi->pager_sva, &kmi->pager_eva,
                                (nswbuf*MAXPHYS) + 0 );

the hang goes away.  The last argument to kmem_suballoc is a vm_size_t;
I'm wondering if there is some odd type conversion going on, and that the
+0 causes a different conversion.

I'm compiling with the default CFLAGS, which includes -O2. I can't seem to
find the knob to change it back to -O to test for a optimization bug.

Insights appreciated :)

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite@gumbysoft.com          |  www.FreeBSD.org



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