lkml.org 
[lkml]   [2011]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 2/2] vmscan: activate executable pages after first usage
    From
    Date
    Logic added in commit v2.6.30-5507-g8cab475
    (vmscan: make mapped executable pages the first class citizen)
    was noticeably weakened in commit v2.6.33-5448-g6457474
    (vmscan: detect mapped file pages used only once)

    Currently these pages can become "first class citizens" only after second usage.

    After this patch page_check_references() will activate they after first usage,
    and executable code gets yet better chance to stay in memory.

    TODO:
    run some cool tests like in v2.6.30-5507-g8cab475 =)

    Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
    ---
    mm/vmscan.c | 6 ++++++
    1 files changed, 6 insertions(+), 0 deletions(-)

    diff --git a/mm/vmscan.c b/mm/vmscan.c
    index 3cd766d..29b3612 100644
    --- a/mm/vmscan.c
    +++ b/mm/vmscan.c
    @@ -727,6 +727,12 @@ static enum page_references page_check_references(struct page *page,
    if (referenced_page || referenced_ptes > 1)
    return PAGEREF_ACTIVATE;

    + /*
    + * Activate file-backed executable pages after first usage.
    + */
    + if (vm_flags & VM_EXEC)
    + return PAGEREF_ACTIVATE;
    +
    return PAGEREF_KEEP;
    }



    \
     
     \ /
      Last update: 2011-08-08 13:09    [W:4.931 / U:0.708 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site