lkml.org 
[lkml]   [2001]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectSwap reclaiming
    Hi!

    Browsing through 2.4.8 patch, I found this:

    +/*
    + * When swap space gets filled up, we will set this flag.
    + * This will make do_swap_page(), in the page fault path,
    + * free swap entries on swapin so we'll reclaim swap space
    + * in order to be able to swap something out.
    + *
    + * At the moment we start reclaiming when swap usage goes
    + * over 80% of swap space.
    + *
    + * XXX: Random numbers, fixme.
    + */
    +#define SWAP_FULL_PCT 80
    +int vm_swap_full (void)
    +{
    + int swap_used = total_swap_pages - nr_swap_pages;
    +
    + return swap_used * 100 > total_swap_pages * SWAP_FULL_PCT;
    +}
    +

    Hmm... This kind-of defeats purposes on swap priorities: with this,
    you are going to fill slow swap even through there is lots of fast
    swap that could be reclaimed.

    I'm not sure what fix should be.
    Pavel
    --
    I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
    Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org
    -
    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: 2005-03-22 12:58    [W:0.020 / U:30.792 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site