Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1588805
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V5 2/6] mm: don't assume anonymous pages have SwapBacked flag |
| Date | 2017-02-27 17:50 +0100 |
| Message-ID | <tfwEN-8dT-13@gated-at.bofh.it> (permalink) |
| References | <tevKN-693-3@gated-at.bofh.it> <tevKO-693-25@gated-at.bofh.it> <tfuWl-6ZE-11@gated-at.bofh.it> <tfwEN-8dT-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon 27-02-17 08:10:24, Shaohua Li wrote: > On Mon, Feb 27, 2017 at 03:35:34PM +0100, Michal Hocko wrote: > > On Fri 24-02-17 13:31:45, Shaohua Li wrote: > > > There are a few places the code assumes anonymous pages should have > > > SwapBacked flag set. MADV_FREE pages are anonymous pages but we are > > > going to add them to LRU_INACTIVE_FILE list and clear SwapBacked flag > > > for them. The assumption doesn't hold any more, so fix them. > > > > > > Cc: Michal Hocko <mhocko@suse.com> > > > Cc: Minchan Kim <minchan@kernel.org> > > > Cc: Hugh Dickins <hughd@google.com> > > > Cc: Rik van Riel <riel@redhat.com> > > > Cc: Mel Gorman <mgorman@techsingularity.net> > > > Cc: Andrew Morton <akpm@linux-foundation.org> > > > Acked-by: Johannes Weiner <hannes@cmpxchg.org> > > > Signed-off-by: Shaohua Li <shli@fb.com> Anyway, feel free to add Acked-by: Michal Hocko <mhocko@suse.com> > > > > Looks good to me. > > [...] > > > index 96eb85c..c621088 100644 > > > --- a/mm/rmap.c > > > +++ b/mm/rmap.c > > > @@ -1416,7 +1416,8 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, > > > * Store the swap location in the pte. > > > * See handle_pte_fault() ... > > > */ > > > - VM_BUG_ON_PAGE(!PageSwapCache(page), page); > > > + VM_BUG_ON_PAGE(!PageSwapCache(page) && PageSwapBacked(page), > > > + page); > > > > just this part makes me scratch my head. I really do not understand what > > kind of problem it tries to prevent from, maybe I am missing something > > obvoious... > > Just check a page which isn't lazyfree but wrongly enters here without swap > entry. Or maybe you suggest we delete this statement? Ohh, I figured out when seeing later patch in the series, I then wanted to get back to this one but forgot... This on its own didn't really tell me much. Maybe a comment would be helpful or even drop the VM_BUG_ON altogether. -- Michal Hocko SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH V5 0/6] mm: fix some MADV_FREE issues Shaohua Li <shli@fb.com> - 2017-02-24 22:40 +0100
[PATCH V5 6/6] proc: show MADV_FREE pages info in smaps Shaohua Li <shli@fb.com> - 2017-02-24 22:40 +0100
Re: [PATCH V5 6/6] proc: show MADV_FREE pages info in smaps Michal Hocko <mhocko@kernel.org> - 2017-02-27 16:10 +0100
Re: [PATCH V5 6/6] proc: show MADV_FREE pages info in smaps "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-02-28 04:30 +0100
[PATCH V5 4/6] mm: reclaim MADV_FREE pages Shaohua Li <shli@fb.com> - 2017-02-24 22:40 +0100
Re: [PATCH V5 4/6] mm: reclaim MADV_FREE pages Minchan Kim <minchan@kernel.org> - 2017-02-27 07:50 +0100
Re: [PATCH V5 4/6] mm: reclaim MADV_FREE pages Michal Hocko <mhocko@kernel.org> - 2017-02-27 17:40 +0100
Re: [PATCH V5 4/6] mm: reclaim MADV_FREE pages Minchan Kim <minchan@kernel.org> - 2017-02-28 06:50 +0100
Re: [PATCH V5 4/6] mm: reclaim MADV_FREE pages Michal Hocko <mhocko@kernel.org> - 2017-02-27 16:30 +0100
Re: [PATCH V5 4/6] mm: reclaim MADV_FREE pages Johannes Weiner <hannes@cmpxchg.org> - 2017-02-27 18:30 +0100
Re: [PATCH V5 4/6] mm: reclaim MADV_FREE pages "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-02-28 04:30 +0100
[PATCH V5 1/6] mm: delete unnecessary TTU_* flags Shaohua Li <shli@fb.com> - 2017-02-24 22:40 +0100
Re: [PATCH V5 1/6] mm: delete unnecessary TTU_* flags Michal Hocko <mhocko@kernel.org> - 2017-02-27 16:10 +0100
[PATCH V5 2/6] mm: don't assume anonymous pages have SwapBacked flag Shaohua Li <shli@fb.com> - 2017-02-24 22:40 +0100
Re: [PATCH V5 2/6] mm: don't assume anonymous pages have SwapBacked flag "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-02-27 08:00 +0100
Re: [PATCH V5 2/6] mm: don't assume anonymous pages have SwapBacked flag Michal Hocko <mhocko@kernel.org> - 2017-02-27 16:00 +0100
Re: [PATCH V5 2/6] mm: don't assume anonymous pages have SwapBacked flag Michal Hocko <mhocko@kernel.org> - 2017-02-27 17:50 +0100
csiph-web