lkml.org 
[lkml]   [2017]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list
Date

On February 04, 2017 2:38 PM Hillf Danton wrote:
>
> On February 04, 2017 7:33 AM Shaohua Li wrote:
> > @@ -1404,6 +1401,8 @@ bool madvise_free_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
> > set_pmd_at(mm, addr, pmd, orig_pmd);
> > tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
> > }
> > +
> > + mark_page_lazyfree(page);
> > ret = true;
> > out:
> > spin_unlock(ptl);
>
> <snipped>
>
> > -void deactivate_page(struct page *page)
> > -{
> > - if (PageLRU(page) && PageActive(page) && !PageUnevictable(page)) {
> > - struct pagevec *pvec = &get_cpu_var(lru_deactivate_pvecs);
> > +void mark_page_lazyfree(struct page *page)
> > + {
> > + if (PageLRU(page) && PageAnon(page) && PageSwapBacked(page) &&
> > + !PageUnevictable(page)) {
> > + struct pagevec *pvec = &get_cpu_var(lru_lazyfree_pvecs);
> >
> > get_page(page);
> > if (!pagevec_add(pvec, page) || PageCompound(page))
> > - pagevec_lru_move_fn(pvec, lru_deactivate_fn, NULL);
> > - put_cpu_var(lru_deactivate_pvecs);
> > + pagevec_lru_move_fn(pvec, lru_lazyfree_fn, NULL);
> > + put_cpu_var(lru_lazyfree_pvecs);
> > }
> > }
>
> You are not adding it but would you please try to fix or avoid flipping
> preempt count with page table lock hold?
>
preempt_en/disable are embedded in spin_lock/unlock, so please
ignore my noise.

thanks
Hillf

\
 
 \ /
  Last update: 2017-02-09 07:34    [W:0.099 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site