[lkml]   [2001]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: kswap spinning
    On Mon, 20 Aug 2001, Marcelo Tosatti wrote:

    > > Could you please boot with profile=2 and use readprofile to find out where
    > > kswapd is spending its time?
    > Well, I've just noted Linus made kswapd loop as long as there is any
    > kind (inactive or free) shortage.

    Well, duh. Let me explain.

    >From mm/vmscan.c::kswapd() a short comment I wrote while
    implementing part of the current VM:

    * We go to sleep if either the free page shortage
    * or the inactive page shortage is gone. We do this
    * because:
    * 1) we need no more free pages or
    * 2) the inactive pages need to be flushed to disk,
    * it wouldn't help to eat CPU time now ...
    * We go to sleep for one second, but if it's needed
    * we'll be woken up earlier...
    if (!free_shortage() || !inactive_shortage()) {
    interruptible_sleep_on_timeout(&kswapd_wait, HZ);

    I wonder when Linus lost his ability to read comments ;)


    IA64: a worthy successor to i860.

    Send all your spam to (spam digging piggy)

    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:57    [W:0.022 / U:2.432 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site