On Tue, Dec 13, 2005 at 02:44:33PM +1100, David Chinner wrote:
> On Tue, Dec 13, 2005 at 02:58:29AM +0100, Andi Kleen wrote:
> > > Well, if you can define "available memory" in any sane way in
> > > the context we are operating in then that would work.
> >
> > Just total memory. XFS uses that already for some things.
> > Not 100% bullet proof, but a reasonable approximation
>
> Ok. That's along the lines that I was thinking of as well.
> Thanks, Andi......
Sorry I should have made it clearer: it should be probably
lowmem only for 32bit machines (unless you teach XFS to
kmap these buffers on demand, which would be probably
deadlock country too though)
This means using the "max_low_pfn" variable.
Linux actually has a quite big zoo of various end of
memory variables, can be easily confused...
And looking at the existing code using si.totalram
is probably wrong for the sizing of the journal buffers
too again because it doesn't take low/highmem into
account. I would just remove xfs_physmem and always
use max_low_pfn for this.
This will of course lower the defaults on 32bit x86
systems a lot because they typically don't have
more than 900MB lowmem. But it's probably TRT.
-Andi
|