Re: [PATCH 1/4] mm: Introduce and use page_cache_empty

2020-08-15 Thread Matthew Wilcox
On Fri, Aug 07, 2020 at 02:24:00AM +0300, Kirill A. Shutemov wrote: > On Tue, Aug 04, 2020 at 05:17:52PM +0100, Matthew Wilcox (Oracle) wrote: > > diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h > > index 484a36185bb5..a474a92a2a72 100644 > > --- a/include/linux/pagemap.h > > +++

Re: [PATCH 1/4] mm: Introduce and use page_cache_empty

2020-08-06 Thread Kirill A. Shutemov
On Tue, Aug 04, 2020 at 05:17:52PM +0100, Matthew Wilcox (Oracle) wrote: > diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h > index 484a36185bb5..a474a92a2a72 100644 > --- a/include/linux/pagemap.h > +++ b/include/linux/pagemap.h > @@ -18,6 +18,11 @@ > > struct pagevec; > >

[PATCH 1/4] mm: Introduce and use page_cache_empty

2020-08-04 Thread Matthew Wilcox (Oracle)
Instead of checking the two counters (nrpages and nrexceptional), we can just check whether i_pages is empty. Signed-off-by: Matthew Wilcox (Oracle) --- fs/block_dev.c | 2 +- fs/dax.c| 2 +- include/linux/pagemap.h | 5 + mm/truncate.c | 18