lkml.org 
[lkml]   [2009]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectWarn when we run out of swap space (was Re: Misleading OOM messages)

    Subject: Warn if we run out of swap space

    Running out of swap space means that the evicton of anonymous pages may no longer
    be possible which can lead to OOM conditions.

    Print a warning when swap space first becomes exhausted.

    Signed-off-by: Christoph Lameter <cl@linux-foundation.org>

    ---
    mm/swapfile.c | 1 +
    1 file changed, 1 insertion(+)

    Index: linux-2.6/mm/swapfile.c
    ===================================================================
    --- linux-2.6.orig/mm/swapfile.c 2009-05-22 09:07:40.000000000 -0500
    +++ linux-2.6/mm/swapfile.c 2009-05-22 09:15:59.000000000 -0500
    @@ -412,6 +412,7 @@ swp_entry_t get_swap_page(void)
    nr_swap_pages++;
    noswap:
    spin_unlock(&swap_lock);
    + WARN_ONCE(1, "All of swap is in use. Some pages cannot be swapped out.");
    return (swp_entry_t) {0};
    }


    \
     
     \ /
      Last update: 2009-05-22 17:01    [W:2.360 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site