lkml.org 
[lkml]   [2009]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] Clear reference bit although page isn't mapped.
    Date
    > btw, current shrink_active_list() have unnecessary page_mapping_inuse() call.
    > it prevent to drop page reference bit from unmapped cache page. it mean
    > we protect unmapped cache page than mapped page. it is strange.

    How about this?

    ---------------------------------
    SplitLRU VM replacement algorithm assume shrink_active_list() clear
    the page's reference bit. but unnecessary page_mapping_inuse() test
    prevent it.

    This patch remove it.

    Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    ---
    mm/vmscan.c | 3 +--
    1 files changed, 1 insertions(+), 2 deletions(-)

    diff --git a/mm/vmscan.c b/mm/vmscan.c
    index 00156f2..3e942b5 100644
    --- a/mm/vmscan.c
    +++ b/mm/vmscan.c
    @@ -1347,8 +1347,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
    }

    /* page_referenced clears PageReferenced */
    - if (page_mapping_inuse(page) &&
    - page_referenced(page, 0, sc->mem_cgroup, &vm_flags)) {
    + if (page_referenced(page, 0, sc->mem_cgroup, &vm_flags)) {
    nr_rotated++;
    /*
    * Identify referenced, file-backed active pages and
    --
    1.6.5.2




    \
     
     \ /
      Last update: 2009-12-02 03:57    [W:0.022 / U:29.556 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site