Re: [PATCH] allocation looping + kswapd CPU cycles

Jens Axboe
2001-05-08T19:23:08Z

On Tue, May 08 2001, Marcelo Tosatti wrote:
> > The attached patch (against 2.4.5-pre1) fixes the looping symptom, by
> > adding a counter and looping only twice for non-zero order allocations.
>
> Looks good. (actually Rik had a patch similar to this which fixed a real
> case with cdda2wav just like you described)

Not cdda2wav, I pressume, but the optimization discussed here before that
wasn't really doable because of the vm behaviour when doing

do
try to alloc some amount of contiogous pages
if (ok)
break

lower number of pages wanted
while true

CDROMREADAUDIO stopped doing this and fell back to single cdda frame
size allocations because of these failures, even though it meant a huge
decrease in speed. cdda2wav will ask for iirc 16 frames at the time, the
current driver will try and to 8 first and then fall back to slower
extraction if allocations fail.

--
Jens Axboe