> This may be an ancillary effect of what's mentioned above, but when num_physpages > grows in size, nr_free_pages doesn't track with it, so in void vfs_caches_init(unsigned long > mempages) and the like, you get a horrible underflow condition: > > /* code */ > printk("MJS - nr_free_pages():0x%X\n", nr_free_pages()); > printk("MJS - OLD mempages:0x%X\n", mempages); > reserve = (mempages - nr_free_pages()) * 3/2; > mempages -= reserve; > printk("MJS - NEW reserve:0x%X mempages:0x%X\n", > reserve, mempages); > > /* printout */ > MJS - nr_free_pages():0x1E9A0 > MJS - OLD mempages:0x90000 > MJS - NEW reserve:0xAA190 mempages:0xFFFE5E70 I thought I'd wrap up this thread, especially with the HIGHMEM thread still going around: http://www.linux-mips.org/archives/linux-mips/2004-12/msg00141.html The above underflow *was* my problem. I was working in 2.6.6-rc3 before; with the patch below from 2.6.7-rc1 everything works fine. # VFS cache sizing fix for small machines http://linux.bkbits.net:8080/linux-2.6/diffs/fs/dcache.c@xxxx?nav=index.html |src/|src/fs|hist/fs/dcache.c # BitKeeper ChangeSet http://linux.bkbits.net:8080/linux-2.6/cset@xxxxxxxxxxxx?nav=index.html|src/ |src/fs|related/fs/dcache.c In fs/dcache.c, vfs_caches_init(): < reserve = (mempages - nr_free_pages()) * 3/2; > reserve = min((mempages - nr_free_pages()) * 3/2, mempages - 1); Regards, Matt ----- Original Message ----- From: "Thomas Petazzoni" <thomas.petazzoni@xxxxxxxx> To: "Matthew Starzewski" <mstarzewski@xxxxxxxxxxx> Cc: <linux-mips@xxxxxxxxxxxxxx> Sent: Friday, December 10, 2004 10:10 AM Subject: Re: Using more than 256 MB of memory on SB1250 in 32-bit mode, revisited