Re: [Lhms-devel] [PATCH 0/7] Fragmentation Avoidance V19

Linus Torvalds
2005-11-03T19:08:30Z

On Thu, 3 Nov 2005, Martin J. Bligh wrote:
>
> Ha. Just because I don't think I made you puke hard enough already with
> foul approximations ... for order 2, I think it's

Your basic fault is in believing that the free watermark would stay
constant.

That's insane.

Would you keep 8MB free on a 64MB system?

Would you keep 8MB free on a 8GB system?

The point being, that if you start with insane assumptions, you'll get
insane answers.

The _correct_ assumption is that you aim to keep some fixed percentage of
memory free. With that assumption and your math, finding higher-order
pages is equally hard regardless of amount of memory.

Now, your math then doesn't allow for the fact that buddy automatically
coalesces for you, so in fact things get _easier_ with more memory, but
hey, that needs more math than I can come up with (I never did it as math,
only as simulations with allocation patterns - "smart people use math,
plodding people just try to simulate an estimate" ;)

Linus