lkml.org 
[lkml]   [2007]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] free swap space when (re)activating page
On Tue, 20 Feb 2007, Rik van Riel wrote:

> > Maybe the hunk does apply in a different location than I thought.
>
> I suspect that's the case ...

No that is not the case:

@@ -875,6 +878,11 @@ force_reclaim_mapped:
pagevec_strip(&pvec);
spin_lock_irq(&zone->lru_lock);
}
+ if (vm_swap_full()) {
+ spin_unlock_irq(&zone->lru_lock);
+ pagevec_swap_free(&pvec);
+ spin_lock_irq(&zone->lru_lock);
+ }

pgmoved = 0;
while (!list_empty(&l_active)) {

So you do the swap free on the pages leftover from moving to the inactive
list and not to the pages that will be moved to the active list. It does
not do what you wanted to be done.

You need to

1. Do the pagevec_swap_free in the loop over the active pages

2. At end of the loop over the active pages do something like the above.

-
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/

\
 
 \ /
  Last update: 2007-02-20 20:45    [W:0.054 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site