[lkml]   [2001]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Please test: workaround to help swapoff behaviour

On Thu, 7 Jun 2001, Bulent Abali wrote:

> I tested your patch against 2.4.5. It works. No more lockups. Without
> the
> patch it took 14 minutes 51 seconds to complete swapoff (this is to recover
> 1.5GB of
> swap space). During this time the system was frozen. No keyboard, no
> screen, etc. Practically locked-up.
> With the patch there are no more lockups. Swapoff kept running in the
> background.
> This is a winner.
> But here is the caveat: swapoff keeps burning 100% of the cycles until it
> completes.

Yup. Wait a while until the dead swap cache issue is sorted out.

When that finally happens, the time spent in swapoff will probably be

> This is not going to be a big deal during shutdowns. Only when you enter
> swapoff from
> the command line it is going to be a problem.
> 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.

The real fix is to make the processing the other way around --- go looking
into the pte's and from there do the swapins.

Don't have the time to do everything, though. :)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.033 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site