Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2002 19:04:43 +0200
From:      Bernd Walter <ticso@cicely5.cicely.de>
To:        freebsd-current@FreeBSD.ORG
Subject:   nbuf calculation broken (was: deadlock waiting for newbuf)
Message-ID:  <20020520170443.GA70468@cicely5.cicely.de>
In-Reply-To: <20020520143935.GE68981@cicely5.cicely.de>
References:  <20020520133725.GB68981@cicely5.cicely.de> <20020520143935.GE68981@cicely5.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
nbuf on that 256M machine is only 50.
All other values depend on it.
If have neither configure NBUF in my kernconfig nor do I have set
kern.nbuf in loader(8).

In sys/kern/vfs_bio.c kern_vfs_bio_buffer_alloc() we have:
        if (nbuf == 0) {
                int factor = 4 * BKVASIZE / 1024;

                nbuf = 50;
                if (physmem_est > 4096)
                        nbuf += min((physmem_est - 4096) / factor,
                            65536 / factor);
                if (physmem_est > 65536)
                        nbuf += (physmem_est - 65536) * 2 / (factor * 5);

                if (maxbcache && nbuf > maxbcache / BKVASIZE)
                        nbuf = maxbcache / BKVASIZE;
        }

BKVASIZE should be OK.
That means physmem_est must be < 4096 when kern_vfs_bio_buffer_alloc()
is called.
This points to vm_ksubmap_init() or below.

-- 
B.Walter              COSMO-Project         http://www.cosmo-project.de
ticso@cicely.de         Usergroup           info@cosmo-project.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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