Thread (57 messages) 57 messages, 7 authors, 2012-12-19

Re: [patch 2/8] mm: vmscan: disregard swappiness shortly before going OOM

From: Rik van Riel <hidden>
Date: 2012-12-14 15:45:31
Also in: lkml

On 12/14/2012 03:37 AM, Michal Hocko wrote:
I can answer the later. Because memsw comes with its price and
swappiness is much cheaper. On the other hand it makes sense that
swappiness==0 doesn't swap at all. Or do you think we should get back to
_almost_ doesn't swap at all?
swappiness==0 will swap in emergencies, specifically when we have
almost no page cache left, we will still swap things out:

         if (global_reclaim(sc)) {
                 free  = zone_page_state(zone, NR_FREE_PAGES);
                 if (unlikely(file + free <= high_wmark_pages(zone))) {
                         /*
                          * If we have very few page cache pages, force-scan
                          * anon pages.
                          */
                         fraction[0] = 1;
                         fraction[1] = 0;
                         denominator = 1;
                         goto out;

This makes sense, because people who set swappiness==0 but
do have swap space available would probably prefer some
emergency swapping over an OOM kill.

-- 
All rights reversed

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help