Re: [PATCH] free swap space when (re)activating page

2007-02-22 Thread Rik van Riel
Bodo Eggert wrote: Rik van Riel <[EMAIL PROTECTED]> wrote: +++ linux-2.6.20.noarch/mm/swap.c2007-02-20 06:44:17.0 -0500 @@ -420,6 +420,26 @@ void pagevec_strip(struct pagevec *pvec) +if (printk_ratelimit()) +printk("kswapd

Re: [PATCH] free swap space when (re)activating page

2007-02-22 Thread Bodo Eggert
Rik van Riel <[EMAIL PROTECTED]> wrote: +++ linux-2.6.20.noarch/mm/swap.c2007-02-20 06:44:17.0 -0500 @@ -420,6 +420,26 @@ void pagevec_strip(struct pagevec *pvec) > +if (printk_ratelimit()) > +printk("kswapd freed a swap spac

Re: [PATCH] free swap space when (re)activating page

2007-02-21 Thread Al Boldi
Rik van Riel wrote: > Rik van Riel wrote: > > ... because I think this is what my patch does :) > > Never mind, I see it now. > > The attached patch should be correct. Your patch seems to improve the situation a little bit, but the numbers still look weird, especially for swap-in, which gets prog

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Christoph Lameter
On Tue, 20 Feb 2007, Rik van Riel wrote: > Btw, why do we not call pagevec_strip on the pages on l_active? > I assume we want to reclaim their buffer heads, too... But those buffer heads may be used soon. So its better to leave them alone. - To unsubscribe from this list: send the line "unsubs

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Christoph Lameter
On Tue, 20 Feb 2007, Rik van Riel wrote: > The attached patch should be correct. Oh. It vanished again when I replied to your mail. > Btw, why do we not call pagevec_strip on the pages on l_active? > I assume we want to reclaim their buffer heads, too... Yes we want to reduce buffer heads if w

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Rik van Riel
Rik van Riel wrote: ... because I think this is what my patch does :) Never mind, I see it now. The attached patch should be correct. Btw, why do we not call pagevec_strip on the pages on l_active? I assume we want to reclaim their buffer heads, too... -- All Rights Reversed --- linux-2.6.2

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Rik van Riel
Christoph Lameter wrote: On Tue, 20 Feb 2007, Rik van Riel wrote: Nono, I try to remove the swap space occupied by pages that go back onto the active list. Regardless of whether they were already there, or whether they started out on the inactive list. Ok then do it for all pages that go bac

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Christoph Lameter
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_loc

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread William Lee Irwin III
On Fri, Feb 16, 2007 at 05:46:29PM -0500, Rik van Riel wrote: > The attached patch does what I described in the other thread, it > makes the pageout code free swap space when swap is getting full, > by taking away the swap space from pages that get moved onto or > back onto the active list. > In so

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Christoph Lameter
On Tue, 20 Feb 2007, Rik van Riel wrote: > Nono, I try to remove the swap space occupied by pages that > go back onto the active list. Regardless of whether they > were already there, or whether they started out on the > inactive list. Ok then do it for all pages that go back not just for those

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Rik van Riel
Christoph Lameter wrote: On Tue, 20 Feb 2007, Rik van Riel wrote: It was the portion that modifies shrink_active_list. Why operate on the pagevec there? The pagevec only contains the leftovers to be released from scanning over the temporary inactive list. Why? Because the pages that were not

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Christoph Lameter
On Tue, 20 Feb 2007, Rik van Riel wrote: > > It was the portion that modifies shrink_active_list. Why operate > > on the pagevec there? The pagevec only contains the leftovers to be released > > from scanning over the temporary inactive list. > > Why? Because the pages that were not referenced w

Re: [PATCH] free swap space when (re)activating page

2007-02-20 Thread Rik van Riel
Christoph Lameter wrote: On Fri, 16 Feb 2007, Rik van Riel wrote: What do you think? Looks good apart from one passage (which just vanished when I tried to reply, please post patches as inline text). It was the portion that modifies shrink_active_list. Why operate on the pagevec there? The

Re: [PATCH] free swap space when (re)activating page

2007-02-19 Thread Christoph Lameter
On Fri, 16 Feb 2007, Rik van Riel wrote: > What do you think? Looks good apart from one passage (which just vanished when I tried to reply, please post patches as inline text). It was the portion that modifies shrink_active_list. Why operate on the pagevec there? The pagevec only contains the l

[PATCH] free swap space when (re)activating page

2007-02-16 Thread Rik van Riel
The attached patch does what I described in the other thread, it makes the pageout code free swap space when swap is getting full, by taking away the swap space from pages that get moved onto or back onto the active list. In some tests on a system with 2GB RAM and 1GB swap, it kept the free swap