lkml.org 
[lkml]   [1998]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Strange interrupt behaviour


On Tue, 14 Jul 1998, Alex Buell wrote:
>
> Ok, we get the point. I've just had a thought - what if the problems we've
> been seeing with the memory allocation/defragmentation issues are unique
> to low memory machines? If that is the case, then maybe we should have a
> _different_ algorithm for handling these low memory machines (use 2.0.x
> algorithms?), and keep the existing one for boxes with plenty of memory.

Yes.

This is actually one thing that surprised me when I did the math myself.
My own intuition had actually been that it shouldn't matter how much
memory you have, as long as you keep some fixed percentage "x" free of
that memory.

And I think this is what tripped me, and it was very illuminating for me
to look at the actual numbers. They showed clearly that the likelihood for
finding consecutive pages was _not_ a function of the percentage of free
pages. It's very sensitive indeed to how much memory you have total, and
it's fairly non-linear.

It makes perfect sense when I actually look at the math, but I had gone
purely on intuition, and I think this is partly why I've been so happy
with 2.1.x, but others have been trying to patch around things in it to
hide problems they had on smaller memory machines. So trying to convince
others that buddy and random is ok definitely showed a hole in my own
intuition also.

Just in case you're interested, I'll append my generated table. The
percentage number is the probability for not finding a 8kB allocation with
those particular parameters..

Anyway, looking at the table it is fairly obvious why machines with much
memory don't tend to have problems..

Linus

-----
[torvalds@penguin torvalds]$ ./a.out
X = 1024, Y = 20 ( 4MB, 2% free) = 68.6673%
X = 1024, Y = 51 ( 4MB, 5% free) = 7.6047%
X = 1024, Y = 81 ( 4MB, 8% free) = 0.1245%
X = 2048, Y = 40 ( 8MB, 2% free) = 46.2224%
X = 2048, Y = 102 ( 8MB, 5% free) = 0.5488%
X = 2048, Y = 163 ( 8MB, 8% free) = 0.0001%

X = 4096, Y = 81 ( 16MB, 2% free) = 20.1256%
X = 4096, Y = 204 ( 16MB, 5% free) = 0.0029%
X = 4096, Y = 327 ( 16MB, 8% free) = 0.0000%
X = 8192, Y = 163 ( 32MB, 2% free) = 3.8125%
X = 8192, Y = 409 ( 32MB, 5% free) = 0.0000%
X = 8192, Y = 655 ( 32MB, 8% free) = 0.0000%
X = 16384, Y = 327 ( 64MB, 2% free) = 0.1368%
X = 16384, Y = 819 ( 64MB, 5% free) = 0.0000%
X = 16384, Y = 1310 ( 64MB, 8% free) = 0.0000%
X = 32768, Y = 655 (128MB, 2% free) = 0.0002%
X = 32768, Y = 1638 (128MB, 5% free) = 0.0000%
X = 32768, Y = 2621 (128MB, 8% free) = 0.0000%
X = 65536, Y = 1310 (256MB, 2% free) = 0.0000%
X = 65536, Y = 3276 (256MB, 5% free) = 0.0000%
X = 65536, Y = 5242 (256MB, 8% free) = 0.0000%

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site