Re: Break 2.4 VM in five easy steps

Hugh Dickins (hugh@veritas.com)
Wed, 6 Jun 2001 15:51:34 +0100 (BST)


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/