Re: [patch] balanced highmem subsystem under pre7-9

Stephen C. Tweedie
2000-05-13T11:57:01Z

Hi,

On Fri, May 12, 2000 at 07:48:45PM -0300, Rik van Riel wrote:

> > if (tsk->need_resched)
> > - schedule();
> > + goto sleep;
>
> This is wrong. It will make it much much easier for processes to
> get killed (as demonstrated by quintela's VM test suite).

It shouldn't. If tasks are getting killed, then the fix should be
in alloc_pages, not in kswapd. Tasks _should_ be quite able to wait
for memory, and if necessary, drop into try_to_free_pages themselves.

Linus, the fix above seems to be necessary. Without it, even a simple
playing of mp3 audio on 2.3 fails once memory is full on a 256MB box,
with kswapd consuming between 5% and 25% of CPU and locking things up
sufficiently to cause dropouts in the playback every second or more.
With that one-liner fix, mp3 is smooth even in the presence of other
background file activity.

--Stephen