Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1583104
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages |
| Date | 2017-02-17 06:50 +0100 |
| Message-ID | <tbJAB-8w3-1@gated-at.bofh.it> (permalink) |
| References | <taR7b-5Vy-3@gated-at.bofh.it> <taR7d-5Vy-35@gated-at.bofh.it> <tbzhU-1Tc-13@gated-at.bofh.it> <tbJAB-8w3-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Shaohua,
On Thu, Feb 16, 2017 at 04:27:18PM -0800, Shaohua Li wrote:
> On Thu, Feb 16, 2017 at 01:40:18PM -0500, Johannes Weiner wrote:
> > On Tue, Feb 14, 2017 at 11:36:09AM -0800, Shaohua Li wrote:
> > > @@ -1419,11 +1419,18 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
> > > VM_BUG_ON_PAGE(!PageSwapCache(page) && PageSwapBacked(page),
> > > page);
> > >
> > > - if (!PageDirty(page) && (flags & TTU_LZFREE)) {
> > > - /* It's a freeable page by MADV_FREE */
> > > - dec_mm_counter(mm, MM_ANONPAGES);
> > > - rp->lazyfreed++;
> > > - goto discard;
> > > + if (flags & TTU_LZFREE) {
> > > + if (!PageDirty(page)) {
> > > + /* It's a freeable page by MADV_FREE */
> > > + dec_mm_counter(mm, MM_ANONPAGES);
> > > + rp->lazyfreed++;
> > > + goto discard;
> > > + } else {
> > > + set_pte_at(mm, address, pvmw.pte, pteval);
> > > + ret = SWAP_FAIL;
> > > + page_vma_mapped_walk_done(&pvmw);
> > > + break;
> > > + }
> >
> > I don't understand why we need the TTU_LZFREE bit in general. More on
> > that below at the callsite.
>
> Sounds useless flag, don't see any reason we shouldn't free the MADV_FREE page
> in places other than reclaim. Looks TTU_UNMAP is useless too..
Agree on TTU_UNMAP but for example, THP split doesn't mean free lazyfree pages,
I think.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V3 0/7] mm: fix some MADV_FREE issues Shaohua Li <shli@fb.com> - 2017-02-14 20:40 +0100
[PATCH V3 3/7] mm: reclaim MADV_FREE pages Shaohua Li <shli@fb.com> - 2017-02-14 20:40 +0100
Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages Johannes Weiner <hannes@cmpxchg.org> - 2017-02-16 19:50 +0100
Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages Minchan Kim <minchan@kernel.org> - 2017-02-17 06:50 +0100
Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages Johannes Weiner <hannes@cmpxchg.org> - 2017-02-17 17:20 +0100
Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages Minchan Kim <minchan@kernel.org> - 2017-02-17 06:50 +0100
Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages Minchan Kim <minchan@kernel.org> - 2017-02-17 10:30 +0100
Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages Johannes Weiner <hannes@cmpxchg.org> - 2017-02-17 17:20 +0100
Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages Johannes Weiner <hannes@cmpxchg.org> - 2017-02-17 17:10 +0100
Re: [PATCH V3 3/7] mm: reclaim MADV_FREE pages Johannes Weiner <hannes@cmpxchg.org> - 2017-02-17 21:10 +0100
[PATCH V3 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list Shaohua Li <shli@fb.com> - 2017-02-14 20:40 +0100
Re: [PATCH V3 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list Johannes Weiner <hannes@cmpxchg.org> - 2017-02-16 19:00 +0100
Re: [PATCH V3 2/7] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list Johannes Weiner <hannes@cmpxchg.org> - 2017-02-17 17:30 +0100
csiph-web