Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-19 Thread John Hubbard
On 2/19/20 7:01 AM, Matthew Wilcox wrote: > On Wed, Feb 19, 2020 at 06:52:46AM -0800, Christoph Hellwig wrote: >> On Wed, Feb 19, 2020 at 06:41:17AM -0800, Matthew Wilcox wrote: >>> #define readahead_for_each(rac, page) \ >>> while ((page =

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-19 Thread Christoph Hellwig
On Wed, Feb 19, 2020 at 06:41:17AM -0800, Matthew Wilcox wrote: > #define readahead_for_each(rac, page) \ > while ((page = readahead_page(rac))) > > No more readahead_next() to forget to add to filesystems which don't use > the readahead_for_each()

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-19 Thread Matthew Wilcox
On Wed, Feb 19, 2020 at 06:52:46AM -0800, Christoph Hellwig wrote: > On Wed, Feb 19, 2020 at 06:41:17AM -0800, Matthew Wilcox wrote: > > #define readahead_for_each(rac, page) \ > > while ((page = readahead_page(rac))) > > > > No more readahead_next() to

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-19 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 04:01:43PM -0800, John Hubbard wrote: > How about this instead? It uses the "for" loop fully and more naturally, > and is easier to read. And it does the same thing: > > static inline struct page *readahead_page(struct readahead_control *rac) > { > struct page *page;

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-18 Thread John Hubbard
On 2/18/20 5:02 PM, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 04:01:43PM -0800, John Hubbard wrote: >> How about this instead? It uses the "for" loop fully and more naturally, >> and is easier to read. And it does the same thing: >> >> static inline struct page *readahead_page(struct

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-18 Thread John Hubbard
On 2/18/20 5:02 PM, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 04:01:43PM -0800, John Hubbard wrote: >> How about this instead? It uses the "for" loop fully and more naturally, >> and is easier to read. And it does the same thing: >> >> static inline struct page *readahead_page(struct

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 04:01:43PM -0800, John Hubbard wrote: > How about this instead? It uses the "for" loop fully and more naturally, > and is easier to read. And it does the same thing: > > static inline struct page *readahead_page(struct readahead_control *rac) > { > struct page *page;

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 07:42:22AM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 05:14:59PM +1100, Dave Chinner wrote: > > On Mon, Feb 17, 2020 at 10:45:52AM -0800, Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > > > At allocation time, put the pages in the cache

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > At allocation time, put the pages in the cache unless we're using > ->readpages. Add the readahead_for_each() iterator for the benefit of > the ->readpage fallback. This iterator supports huge pages, even though >

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 05:14:59PM +1100, Dave Chinner wrote: > On Mon, Feb 17, 2020 at 10:45:52AM -0800, Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" > > > > At allocation time, put the pages in the cache unless we're using > > ->readpages. Add the readahead_for_each() iterator

Re: [Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-17 Thread Dave Chinner
On Mon, Feb 17, 2020 at 10:45:52AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > At allocation time, put the pages in the cache unless we're using > ->readpages. Add the readahead_for_each() iterator for the benefit of > the ->readpage fallback. This iterator supports huge

[Cluster-devel] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-17 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" At allocation time, put the pages in the cache unless we're using ->readpages. Add the readahead_for_each() iterator for the benefit of the ->readpage fallback. This iterator supports huge pages, even though none of the filesystems to be converted do yet.