Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1345528
| From | Joonsoo Kim <js1304@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: __delete_from_page_cache WARN_ON(page_mapped) |
| Date | 2016-02-29 08:50 +0100 |
| Message-ID | <r7qKC-8tQ-3@gated-at.bofh.it> (permalink) |
| References | <r7nWq-5to-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2016-02-29 13:49 GMT+09:00 Hugh Dickins <hughd@google.com>:
> Commit e1534ae95004 ("mm: differentiate page_mapped() from page_mapcount()
> for compound pages") changed the famous BUG_ON(page_mapped(page)) in
> __delete_from_page_cache() to VM_BUG_ON_PAGE(page_mapped(page)): which
> gives us more info when CONFIG_DEBUG_VM=y, but nothing at all when not.
>
> Although it has not usually been very helpul, being hit long after the
> error in question, we do need to know if it actually happens on users'
> systems; but reinstating a crash there is likely to be opposed :)
>
> In the non-debug case, use WARN_ON() plus dump_page() and add_taint() -
> I don't really believe LOCKDEP_NOW_UNRELIABLE, but that seems to be the
> standard procedure now. Move that, or the VM_BUG_ON_PAGE(), up before
> the deletion from tree: so that the unNULLified page->mapping gives a
> little more information.
>
> If the inode is being evicted (rather than truncated), it won't have
> any vmas left, so it's safe(ish) to assume that the raised mapcount is
> erroneous, and we can discount it from page_count to avoid leaking the
> page (I'm less worried by leaking the occasional 4kB, than losing a
> potential 2MB page with each 4kB page leaked).
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
> ---
> I think this should go into v4.5, so I've written it with an atomic_sub
> on page->_count; but Joonsoo will probably want some page_ref thingy.
Okay. I will do it after this patch is merged.
Thanks for notification.
Thanks.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: __delete_from_page_cache WARN_ON(page_mapped) Hugh Dickins <hughd@google.com> - 2016-02-29 05:50 +0100
Re: [PATCH] mm: __delete_from_page_cache WARN_ON(page_mapped) Joonsoo Kim <js1304@gmail.com> - 2016-02-29 08:50 +0100
Re: [PATCH] mm: __delete_from_page_cache WARN_ON(page_mapped) "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-02-29 11:00 +0100
Re: [PATCH] mm: __delete_from_page_cache WARN_ON(page_mapped) Hugh Dickins <hughd@google.com> - 2016-03-01 07:50 +0100
[PATCH] mm: __delete_from_page_cache show Bad page if mapped Hugh Dickins <hughd@google.com> - 2016-03-01 07:50 +0100
Re: [PATCH] mm: __delete_from_page_cache show Bad page if mapped "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-03-01 12:20 +0100
csiph-web