Re: [PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-10-25 Thread Kirill A. Shutemov
On Wed, Oct 12, 2016 at 08:43:20AM +0200, Jan Kara wrote: > On Wed 12-10-16 00:53:49, Kirill A. Shutemov wrote: > > On Tue, Oct 11, 2016 at 05:58:15PM +0200, Jan Kara wrote: > > > On Thu 15-09-16 14:54:55, Kirill A. Shutemov wrote: > > > > invalidate_inode_page() has expectation about page_count()

Re: [PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-10-25 Thread Kirill A. Shutemov
On Wed, Oct 12, 2016 at 08:43:20AM +0200, Jan Kara wrote: > On Wed 12-10-16 00:53:49, Kirill A. Shutemov wrote: > > On Tue, Oct 11, 2016 at 05:58:15PM +0200, Jan Kara wrote: > > > On Thu 15-09-16 14:54:55, Kirill A. Shutemov wrote: > > > > invalidate_inode_page() has expectation about page_count()

Re: [PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-10-12 Thread Jan Kara
On Wed 12-10-16 00:53:49, Kirill A. Shutemov wrote: > On Tue, Oct 11, 2016 at 05:58:15PM +0200, Jan Kara wrote: > > On Thu 15-09-16 14:54:55, Kirill A. Shutemov wrote: > > > invalidate_inode_page() has expectation about page_count() of the page > > > -- if it's not 2 (one to caller, one to

Re: [PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-10-12 Thread Jan Kara
On Wed 12-10-16 00:53:49, Kirill A. Shutemov wrote: > On Tue, Oct 11, 2016 at 05:58:15PM +0200, Jan Kara wrote: > > On Thu 15-09-16 14:54:55, Kirill A. Shutemov wrote: > > > invalidate_inode_page() has expectation about page_count() of the page > > > -- if it's not 2 (one to caller, one to

Re: [PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-10-11 Thread Kirill A. Shutemov
On Tue, Oct 11, 2016 at 05:58:15PM +0200, Jan Kara wrote: > On Thu 15-09-16 14:54:55, Kirill A. Shutemov wrote: > > invalidate_inode_page() has expectation about page_count() of the page > > -- if it's not 2 (one to caller, one to radix-tree), it will not be > > dropped. That condition almost

Re: [PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-10-11 Thread Kirill A. Shutemov
On Tue, Oct 11, 2016 at 05:58:15PM +0200, Jan Kara wrote: > On Thu 15-09-16 14:54:55, Kirill A. Shutemov wrote: > > invalidate_inode_page() has expectation about page_count() of the page > > -- if it's not 2 (one to caller, one to radix-tree), it will not be > > dropped. That condition almost

Re: [PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-10-11 Thread Jan Kara
On Thu 15-09-16 14:54:55, Kirill A. Shutemov wrote: > invalidate_inode_page() has expectation about page_count() of the page > -- if it's not 2 (one to caller, one to radix-tree), it will not be > dropped. That condition almost never met for THPs -- tail pages are > pinned to the pagevec. > >

Re: [PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-10-11 Thread Jan Kara
On Thu 15-09-16 14:54:55, Kirill A. Shutemov wrote: > invalidate_inode_page() has expectation about page_count() of the page > -- if it's not 2 (one to caller, one to radix-tree), it will not be > dropped. That condition almost never met for THPs -- tail pages are > pinned to the pagevec. > >

[PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-09-15 Thread Kirill A. Shutemov
invalidate_inode_page() has expectation about page_count() of the page -- if it's not 2 (one to caller, one to radix-tree), it will not be dropped. That condition almost never met for THPs -- tail pages are pinned to the pagevec. Let's drop them, before calling invalidate_inode_page().

[PATCHv3 13/41] truncate: make sure invalidate_mapping_pages() can discard huge pages

2016-09-15 Thread Kirill A. Shutemov
invalidate_inode_page() has expectation about page_count() of the page -- if it's not 2 (one to caller, one to radix-tree), it will not be dropped. That condition almost never met for THPs -- tail pages are pinned to the pagevec. Let's drop them, before calling invalidate_inode_page().