Re: [PATCH] allocation looping + kswapd CPU cycles

Alex Bligh - linux-kernel
2001-05-08T14:54:29Z

> The real fix is to measure fragmentation and the progress of kswapd, but
> that is too drastic for 2.4.x.

I suspect the real fix might, in general, be
a) to reduce use of kmalloc() etc. which gives
physically contiguous memory, where virtually
contiguous memory will do (and is, presumably,
far easier to come by). (or perhaps add some
flag to kmalloc to allocate out of virtual
rather than physical memory).
b) to bias flush or swap out routines to create
physically contiguous higher order blocks.
Many heuristics will give you that ability.

Disclaimer: I haven't looked at this for issue for years,
but Linux seems to fail on >4k allocations now, and
fragment memory far more, than it did on much smaller
systems doing lots of nasty (8k, thus 3 pages including
header) NFS stuff back in 94.

--
Alex Bligh