Re: kswapd @ 60-80% CPU during heavy HD i/o.

From: Rik van Riel (riel@conectiva.com.br)
Date: Mon May 01 2000 - 20:31:58 EST


On Mon, 1 May 2000, David S. Miller wrote:
> From: Rik van Riel <riel@conectiva.com.br>
> On Mon, 1 May 2000, David S. Miller wrote:
>
> > BTW, what loop are you trying to "continue;" out of here?
> >
> > + do {
> > if (tsk->need_resched)
> > schedule();
> > if ((!zone->size) || (!zone->zone_wake_kswapd))
> > continue;
> > do_try_to_free_pages(GFP_KSWAPD, zone);
> > + } while (zone->free_pages < zone->pages_low &&
> > + --count);
> >
> > :-) Just add a "next_zone:" label at the end of that code and
> > change the continue; to a goto next_zone;
>
> I want kswapd to continue with freeing pages from this zone if
> there aren't enough free pages in this zone. This is needed
> because kswapd used to stop freeing pages even if we were below
> pages_min...
>
> Rik, zone_wake_kswapd implies this information, via what
> __free_pages_ok does to that flag.

Indeed, I should have moved the test for zone->zone_wake_kswapd to
before the loop. But using zone->zone_wake_kswapd for the test isn't
really enough since that is only turned off if zone->free_pages
reaches zone->pages_high, but we probably don't want to do agressive
swapout when we're already above zone->pages_low ...

(just background swapping that happens incidentally when we're
swapping stuff for other zones)

regards,

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies http://www.conectiva.com/ http://www.surriel.com/

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



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:09 EST