tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: nmbclusters on amd64



On Wed, 24 Aug 2016, Michael van Elst wrote:
netbsd%precedence.co.uk@localhost (Stephen Borrill) writes:

# gdb /netbsd
(gdb) print nmbclusters
$1 = 32768

This is the initial value. It is usually clamped to 25% of all
memory (for direct mapping) or 25% of kernel memory depending on
the machine. However, some systems (arm and i386) limit it further.

#ifndef NMBCLUSTERS_MAX
#define NMBCLUSTERS_MAX (0x2000000 / MCLBYTES)  /* Limit to 64MB for clusters */
#endif

The value is probably wrong as the comment and the commit message
talk about a 64MB limit but the value corresponds to 32MB.

Machine in question has 16GB RAM and is running amd64. Reading further, it looks like setting NMBCLUSTERS in netbsd-7 as a compile-time option is only capable of limiting the number which is generally counterproductive:

#ifdef NMBCLUSTERS_MAX
        max_size = MIN(max_size, NMBCLUSTERS_MAX);
#endif

#ifdef NMBCLUSTERS
        return MIN(max_size, NMBCLUSTERS);
#else
        return max_size;
#endif

Perhaps this should have been MAX(max_size, NMBCLUSTERS) which makes more sense to me.

--
Stephen



Home | Main Index | Thread Index | Old Index