lkml.org 
[lkml]   [2020]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 02/10] mm/vmscan: protect the workingset on anonymous LRU
2020년 4월 6일 (월) 오후 6:18, Hillf Danton <hdanton@sina.com>님이 작성:
>
>
> On Fri, 3 Apr 2020 14:40:40 +0900 Joonsoo Kim wrote:
> >
> > @@ -3093,11 +3093,10 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
> > if (unlikely(page != swapcache && swapcache)) {
> > page_add_new_anon_rmap(page, vma, vmf->address, false);
> > mem_cgroup_commit_charge(page, memcg, false, false);
> > - lru_cache_add_active_or_unevictable(page, vma);
> > + lru_cache_add_inactive_or_unevictable(page, vma);
> > } else {
> > do_page_add_anon_rmap(page, vma, vmf->address, exclusive);
> > mem_cgroup_commit_charge(page, memcg, true, false);
> > - activate_page(page);
> > }
> >
> > swap_free(entry);
> ...
> > @@ -996,8 +996,6 @@ static enum page_references page_check_references(struct page *page,
> > return PAGEREF_RECLAIM;
> >
> > if (referenced_ptes) {
> > - if (PageSwapBacked(page))
> > - return PAGEREF_ACTIVATE;
> > /*
> > * All mapped pages start out with page table
> > * references from the instantiating fault, so we need
> > @@ -1020,7 +1018,7 @@ static enum page_references page_check_references(struct page *page,
> > /*
> > * Activate file-backed executable pages after first usage.
> > */
> > - if (vm_flags & VM_EXEC)
> > + if ((vm_flags & VM_EXEC) && !PageSwapBacked(page))
> > return PAGEREF_ACTIVATE;
> >
> > return PAGEREF_KEEP;
> > --
> > 2.7.4
>
> Both changes other than
> s/lru_cache_add_active_or_unevictable/lru_cache_add_inactive_or_unevictable/
> are likely worth their own seperate commits with a concise log.

IMO, all of the changes in this patch provides just one logical change
for LRU management
on anonymous page so it's better to be together.

Thanks.

\
 
 \ /
  Last update: 2020-04-07 02:41    [W:0.618 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site