Re: Please don't beat me up (was Re: Bugs and wishes in memory management area)

Mike Jagdis (
Thu, 28 Nov 1996 10:24:52 +0000 (GMT/BST)

On Wed, 27 Nov 1996, Alan Cox wrote:

> There is an even worse problem with the buddy system, especially on CPU's
> without 4 way caches. All our structures tend to have the used stuff at
> the top and data below. Our kmalloc spends all day landing all the
> critical structures on the same cache line..

That's why I started with the premise that kmalloc should deal in
terms of 16 byte "paragraphs" (32 on an Alpha) and that it should
not blindly pair groups of similar size. (As I've mentioned before,
I gave up coalescing kmalloc fragments completely). After gathering
some stats it seems useful to round requests to about 4*16 but just
add one.

> Some CPU's the TLB is software. On all CPU's I know an SMP CPU invalidation
> needs software and is relatively expensive.

The principle of keep-it-simple applies in buckets. There is a big
price to pay for complexity whether algorithmic or hardware. Unless,
possibly you have absolute control of both the software *and*
hardware design. We wish... :-)


|  Mike Jagdis                  |  Internet:   |
|  Roan Technology Ltd.         |                                      |
|  54A Peach Street, Wokingham  |  Telephone:  +44 118 989 0403        |
|  RG40 1XG, ENGLAND            |  Fax:        +44 118 989 1195        |