Re: new OOM heuristic failure (was: Re: VM: qsbench)

Stephan von Krawczynski
2001-11-02T02:55:36Z

> Ok. I re-checked the code and found out this approach cannot stand.

> the list scan _is_ already exited early when priority is low:

Sorry for followup on my own mail, but there is another thing that
comes to my mind:

swap_out is currently in no way priority-dependant. But it could be
(the parameter is there). How about swapping more pages in tighter
memory situation? The basic idea is that if there is a rising need for
mem it cannot be wrong to do a bit more than under normal
circumstances. One could achieve this simply by:

int counter, nr_pages = SWAP_CLUSTER_MAX;

to

int counter, nr_pages = SWAP_CLUSTER_MAX * DEF_PRIORITY /
priority;

in swap_out.
The idea behind is to reduce the overhead in finding out if swapping
is needed by simply swapping more everytime we already gone "the long
way to knowing".

Regards,
Stephan