Re: Please test: workaround to help swapoff behaviour

Bulent Abali
2001-06-08T23:55:39Z

>> I looked at try_to_unuse in swapfile.c. I believe that the algorithm is
>> broken.
>> For each and every swap entry it is walking the entire process list
>> (for_each_task(p)). It is also grabbing a whole bunch of locks
>> for each swap entry. It might be worthwhile processing swap entries in
>> batches instead of one entry at a time.
>>
>> In any case, I think having this patch is worthwhile as a quick and
dirty
>> remedy.
>
>Bulent,
>
>Could you please check if 2.4.6-pre2+the schedule patch has better
>swapoff behaviour for you?

No problem. I will check it tomorrow. I don't think it can be any worse
than it is now. The patch looks correct in principle.
I believe it should go in to 2.4.6. But I will test it.

On small machines people don't notice it, but otherwise if you have few
GB of memory it really hurts. Shutdowns take forever since swapoff takes
forever.