Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1573608
| From | "Hillf Danton" <hillf.zj@alibaba-inc.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list |
| Date | 2017-02-04 07:40 +0100 |
| Message-ID | <t72aR-518-7@gated-at.bofh.it> (permalink) |
| References | <t6VCp-c7-3@gated-at.bofh.it> <t6VCp-c7-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list Shaohua Li <shli@fb.com> - 2017-02-04 00:40 +0100
Re: [PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-02-04 07:40 +0100
Re: [PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-02-09 07:40 +0100
Re: [PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list Minchan Kim <minchan@kernel.org> - 2017-02-10 08:30 +0100
Re: [PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list Minchan Kim <minchan@kernel.org> - 2017-02-13 06:00 +0100
Re: [PATCH V2 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list Michal Hocko <mhocko@kernel.org> - 2017-02-10 14:30 +0100
csiph-web