lkml.org 
[lkml]   [2020]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 28/39] mm: Avoid splitting large pages
    Date
    From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

    If the filesystem supports large pages, then do not split them before
    removing them from the page cache; remove them as a unit.
    ---
    mm/vmscan.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    diff --git a/mm/vmscan.c b/mm/vmscan.c
    index b06868fc4926..51e6c135575d 100644
    --- a/mm/vmscan.c
    +++ b/mm/vmscan.c
    @@ -1271,9 +1271,10 @@ static unsigned long shrink_page_list(struct list_head *page_list,
    /* Adding to swap updated mapping */
    mapping = page_mapping(page);
    }
    - } else if (unlikely(PageTransHuge(page))) {
    + } else if (PageTransHuge(page)) {
    /* Split file THP */
    - if (split_huge_page_to_list(page, page_list))
    + if (!mapping_large_pages(mapping) &&
    + split_huge_page_to_list(page, page_list))
    goto keep_locked;
    }

    --
    2.26.2
    \
     
     \ /
      Last update: 2020-05-29 05:01    [W:5.149 / U:0.404 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site