Re: [PATCH 09/10] huge pagecache: mmap_sem is unlocked when truncation splits pmd

2016-04-15 Thread Andrew Morton
On Thu, 14 Apr 2016 13:39:22 -0400 Matthew Wilcox wrote: > 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-m

Re: [PATCH 09/10] huge pagecache: mmap_sem is unlocked when truncation splits pmd

2016-04-14 Thread Matthew Wilcox
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. We c

Re: [PATCH 09/10] huge pagecache: mmap_sem is unlocked when truncation splits pmd

2016-04-11 Thread Kirill A. Shutemov
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. > >

[PATCH 09/10] huge pagecache: mmap_sem is unlocked when truncation splits pmd

2016-04-05 Thread Hugh Dickins
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 map