Re: Break 2.4 VM in five easy steps

Hugh Dickins
2001-06-06T14:51:10Z

On Wed, 6 Jun 2001, Andrew Morton wrote:
> Yes. The sys_swapoff() system call can take many minutes

> Haven't looked at it closely, but I think the algorithm
> could become something like:
>
> for (each process) {
> for (each page in this process) {
> if (page is on target swap device)
> get_it_off()
> }
> }

Substitute "mm" for "process". Yes, of course, that would be vastly
better than the present way (or is there some gotcha? it's hard to
understand why someone would choose to write it the way it is).

However... don't forget that another of the current swap problems is
pages being left in the swap cache after they've been unmapped from
(all) their mms - those need to be dealt with too.

Hugh