Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1375673
| From | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 09/10] huge pagecache: mmap_sem is unlocked when truncation splits pmd |
| Date | 2016-04-11 12:40 +0200 |
| Message-ID | <rmHqa-4eH-17@gated-at.bofh.it> (permalink) |
| References | <rkFVw-1aF-7@gated-at.bofh.it> <rkGeS-1hF-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Apr 05, 2016 at 01:55:23PM -0700, Hugh Dickins wrote:
> zap_pmd_range()'s CONFIG_DEBUG_VM !rwsem_is_locked(&mmap_sem) BUG()
> will be invalid with huge pagecache, in whatever way it is implemented:
> truncation of a hugely-mapped file to an unhugely-aligned size would
> easily hit it.
>
> (Although anon THP could in principle apply khugepaged to private file
> mappings, which are not excluded by the MADV_HUGEPAGE restrictions, in
> practice there's a vm_ops check which excludes them, so it never hits
> this BUG() - there's no interface to "truncate" an anonymous mapping.)
>
> We could complicate the test, to check i_mmap_rwsem also when there's a
> vm_file; but my inclination was to make zap_pmd_range() more readable by
> simply deleting this check. A search has shown no report of the issue in
> the years since commit e0897d75f0b2 ("mm, thp: print useful information
> when mmap_sem is unlocked in zap_pmd_range") expanded it from VM_BUG_ON()
> - though I cannot point to what commit I would say then fixed the issue.
>
> But there are a couple of other patches now floating around, neither
> yet in the tree: let's agree to retain the check as a VM_BUG_ON_VMA(),
> as Matthew Wilcox has done; but subject to a vma_is_anonymous() check,
> as Kirill Shutemov has done. And let's get this in, without waiting
> for any particular huge pagecache implementation to reach the tree.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kirill A. Shutemov
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/10] mm: easy preliminaries to THPagecache Hugh Dickins <hughd@google.com> - 2016-04-05 22:40 +0200
[PATCH 01/10] mm: update_lru_size warn and reset bad lru_size Hugh Dickins <hughd@google.com> - 2016-04-05 22:50 +0200
Re: [PATCH 01/10] mm: update_lru_size warn and reset bad lru_size Vlastimil Babka <vbabka@suse.cz> - 2016-04-14 14:00 +0200
[PATCH 06/10] mm: /proc/sys/vm/stat_refresh to force vmstat update Hugh Dickins <hughd@google.com> - 2016-04-05 22:50 +0200
[PATCH 03/10] mm: use __SetPageSwapBacked and dont ClearPageSwapBacked Hugh Dickins <hughd@google.com> - 2016-04-05 22:50 +0200
Re: [PATCH 03/10] mm: use __SetPageSwapBacked and dont ClearPageSwapBacked Mel Gorman <mgorman@techsingularity.net> - 2016-04-06 12:00 +0200
[PATCH 02/10] mm: update_lru_size do the __mod_zone_page_state Hugh Dickins <hughd@google.com> - 2016-04-05 22:50 +0200
[PATCH 04/10] tmpfs: preliminary minor tidyups Hugh Dickins <hughd@google.com> - 2016-04-05 22:50 +0200
[PATCH 05/10] tmpfs: mem_cgroup charge fault to vm_mm not current mm Hugh Dickins <hughd@google.com> - 2016-04-05 22:50 +0200
[PATCH 09/10] huge pagecache: mmap_sem is unlocked when truncation splits pmd Hugh Dickins <hughd@google.com> - 2016-04-05 23:00 +0200
Re: [PATCH 09/10] huge pagecache: mmap_sem is unlocked when truncation splits pmd "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-04-11 12:40 +0200
Re: [PATCH 09/10] huge pagecache: mmap_sem is unlocked when truncation splits pmd Matthew Wilcox <willy@linux.intel.com> - 2016-04-14 19:40 +0200
[PATCH 07/10] huge mm: move_huge_pmd does not need new_vma Hugh Dickins <hughd@google.com> - 2016-04-05 23:00 +0200
Re: [PATCH 07/10] huge mm: move_huge_pmd does not need new_vma "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-04-11 12:30 +0200
[PATCH 08/10] huge pagecache: extend mremap pmd rmap lockout to files Hugh Dickins <hughd@google.com> - 2016-04-05 23:00 +0200
Re: [PATCH 08/10] huge pagecache: extend mremap pmd rmap lockout to files "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-04-11 12:40 +0200
[PATCH 10/10] arch: fix has_transparent_hugepage() Hugh Dickins <hughd@google.com> - 2016-04-05 23:10 +0200
Re: [PATCH 10/10] arch: fix has_transparent_hugepage() David Miller <davem@davemloft.net> - 2016-04-06 01:30 +0200
Re: [PATCH 10/10] arch: fix has_transparent_hugepage() Ingo Molnar <mingo@kernel.org> - 2016-04-06 09:00 +0200
Re: [PATCH 10/10] arch: fix has_transparent_hugepage() Ingo Molnar <mingo@kernel.org> - 2016-04-07 00:00 +0200
Re: [PATCH 10/10] arch: fix has_transparent_hugepage() Gerald Schaefer <gerald.schaefer@de.ibm.com> - 2016-04-06 14:00 +0200
csiph-web