[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <007e01d27eb1$3f98dee0$beca9ca0$@alibaba-inc.com>
Date: Sat, 04 Feb 2017 14:38:07 +0800
From: "Hillf Danton" <hillf.zj@...baba-inc.com>
To: "'Shaohua Li'" <shli@...com>, <linux-kernel@...r.kernel.org>,
<linux-mm@...ck.org>
Cc: <Kernel-team@...com>, <danielmicay@...il.com>, <mhocko@...e.com>,
<minchan@...nel.org>, <hughd@...gle.com>, <hannes@...xchg.org>,
<riel@...hat.com>, <mgorman@...hsingularity.net>,
<akpm@...ux-foundation.org>
Subject: Re: [PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list
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?
thanks
Hillf
Powered by blists - more mailing lists