lkml.org 
[lkml]   [2008]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[-mm][PATCH 7/10] prevent incorrect oom under split_lru

    if zone->recent_scanned parameter become inbalanceing anon and file,
    OOM killer can happened although swappable page exist.

    So, if priority==0, We should try to reclaim all page for prevent OOM.


    Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Acked-by: Rik van Riel <riel@redhat.com>

    ---
    mm/vmscan.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    Index: b/mm/vmscan.c
    ===================================================================
    --- a/mm/vmscan.c
    +++ b/mm/vmscan.c
    @@ -1460,8 +1460,10 @@ static unsigned long shrink_zone(int pri
    * kernel will slowly sift through each list.
    */
    scan = zone_page_state(zone, NR_LRU_BASE + l);
    - scan >>= priority;
    - scan = (scan * percent[file]) / 100;
    + if (priority) {
    + scan >>= priority;
    + scan = (scan * percent[file]) / 100;
    + }
    zone->lru[l].nr_scan += scan + 1;
    nr[l] = zone->lru[l].nr_scan;
    if (nr[l] >= sc->swap_cluster_max)



    \
     
     \ /
      Last update: 2008-06-25 12:11    [W:0.030 / U:3.376 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site