Re: [f2fs-dev] [PATCH v6 17/19] iomap: Restructure iomap_readpages_actor

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 10:04:15PM -0800, Matthew Wilcox wrote: > On Wed, Feb 19, 2020 at 02:29:00PM +1100, Dave Chinner wrote: > > On Mon, Feb 17, 2020 at 10:46:11AM -0800, Matthew Wilcox wrote: > > > @@ -418,6 +412,15 @@ iomap_readpages_actor(struct inode *inode, loff_t > > > pos, loff_t

Re: [f2fs-dev] [PATCH v6 17/19] iomap: Restructure iomap_readpages_actor

2020-02-18 Thread Matthew Wilcox
On Wed, Feb 19, 2020 at 02:29:00PM +1100, Dave Chinner wrote: > On Mon, Feb 17, 2020 at 10:46:11AM -0800, Matthew Wilcox wrote: > > @@ -418,6 +412,15 @@ iomap_readpages_actor(struct inode *inode, loff_t pos, > > loff_t length, > > } > > ret = iomap_readpage_actor(inode,

Re: [f2fs-dev] [PATCH v6 00/19] Change readahead API

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 07:48:32PM -0800, Matthew Wilcox wrote: > On Wed, Feb 19, 2020 at 02:45:25PM +1100, Dave Chinner wrote: > > On Wed, Feb 19, 2020 at 08:26:52AM +1100, Dave Chinner wrote: > > > On Tue, Feb 18, 2020 at 05:42:30AM -0800, Matthew Wilcox wrote: > > > > On Tue, Feb 18, 2020 at

Re: [f2fs-dev] [PATCH v6 10/19] fs: Convert mpage_readpages to mpage_readahead

2020-02-18 Thread Eric Biggers
On Tue, Feb 18, 2020 at 07:47:41PM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 07:28:26PM -0800, Eric Biggers wrote: > > On Mon, Feb 17, 2020 at 10:45:58AM -0800, Matthew Wilcox wrote: > > > diff --git a/include/linux/mpage.h b/include/linux/mpage.h > > > index

Re: [f2fs-dev] [PATCH 3/3] f2fs: skip migration only when BG_GC is called

2020-02-18 Thread Chao Yu
On 2020/2/19 11:04, Jaegeuk Kim wrote: > On 02/19, Chao Yu wrote: >> On 2020/2/19 7:27, Jaegeuk Kim wrote: >>> On 02/17, Chao Yu wrote: On 2020/2/15 2:58, Jaegeuk Kim wrote: > FG_GC needs to move entire section more quickly. > > Signed-off-by: Jaegeuk Kim > --- >

Re: [f2fs-dev] [PATCH v6 00/19] Change readahead API

2020-02-18 Thread Matthew Wilcox
On Wed, Feb 19, 2020 at 02:45:25PM +1100, Dave Chinner wrote: > On Wed, Feb 19, 2020 at 08:26:52AM +1100, Dave Chinner wrote: > > On Tue, Feb 18, 2020 at 05:42:30AM -0800, Matthew Wilcox wrote: > > > On Tue, Feb 18, 2020 at 03:56:33PM +1100, Dave Chinner wrote: > > > > Latest version in your git

Re: [f2fs-dev] [PATCH v6 10/19] fs: Convert mpage_readpages to mpage_readahead

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 07:28:26PM -0800, Eric Biggers wrote: > On Mon, Feb 17, 2020 at 10:45:58AM -0800, Matthew Wilcox wrote: > > diff --git a/include/linux/mpage.h b/include/linux/mpage.h > > index 001f1fcf9836..f4f5e90a6844 100644 > > --- a/include/linux/mpage.h > > +++ b/include/linux/mpage.h

Re: [f2fs-dev] [PATCH v6 00/19] Change readahead API

2020-02-18 Thread Dave Chinner
On Wed, Feb 19, 2020 at 08:26:52AM +1100, Dave Chinner wrote: > On Tue, Feb 18, 2020 at 05:42:30AM -0800, Matthew Wilcox wrote: > > On Tue, Feb 18, 2020 at 03:56:33PM +1100, Dave Chinner wrote: > > > Latest version in your git tree: > > > > > > $ ▶ glo -n 5 willy/readahead > > > 4be497096c04 mm:

Re: [f2fs-dev] [PATCH v6 19/19] mm: Use memalloc_nofs_save in readahead path

2020-02-18 Thread Dave Chinner
On Mon, Feb 17, 2020 at 10:46:13AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Ensure that memory allocations in the readahead path do not attempt to > reclaim file-backed pages, which could lead to a deadlock. It is > possible, though unlikely this is the root cause of a

Re: [f2fs-dev] [PATCH v6 18/19] iomap: Convert from readpages to readahead

2020-02-18 Thread Dave Chinner
On Mon, Feb 17, 2020 at 10:46:12AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in iomap. Convert XFS and ZoneFS to > use it. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/iomap/buffered-io.c | 91

Re: [f2fs-dev] [PATCH v6 08/19] mm: Add readahead address space operation

2020-02-18 Thread Eric Biggers
On Tue, Feb 18, 2020 at 07:10:44PM -0800, Eric Biggers wrote: > On Mon, Feb 17, 2020 at 10:45:54AM -0800, Matthew Wilcox wrote: > > diff --git a/Documentation/filesystems/vfs.rst > > b/Documentation/filesystems/vfs.rst > > index 7d4d09dd5e6d..81ab30fbe45c 100644 > > ---

Re: [f2fs-dev] [PATCH v6 14/19] ext4: Convert from readpages to readahead

2020-02-18 Thread Eric Biggers
On Mon, Feb 17, 2020 at 10:46:05AM -0800, Matthew Wilcox wrote: > diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c > index c1769afbf799..e14841ade612 100644 > --- a/fs/ext4/readpage.c > +++ b/fs/ext4/readpage.c > @@ -7,8 +7,8 @@ > * > * This was originally taken from fs/mpage.c > * > - *

Re: [f2fs-dev] [PATCH v6 10/19] fs: Convert mpage_readpages to mpage_readahead

2020-02-18 Thread Eric Biggers
On Mon, Feb 17, 2020 at 10:45:58AM -0800, Matthew Wilcox wrote: > diff --git a/include/linux/mpage.h b/include/linux/mpage.h > index 001f1fcf9836..f4f5e90a6844 100644 > --- a/include/linux/mpage.h > +++ b/include/linux/mpage.h > @@ -13,9 +13,9 @@ > #ifdef CONFIG_BLOCK > > struct

Re: [f2fs-dev] [PATCH v6 17/19] iomap: Restructure iomap_readpages_actor

2020-02-18 Thread Dave Chinner
On Mon, Feb 17, 2020 at 10:46:11AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > By putting the 'have we reached the end of the page' condition at the end > of the loop instead of the beginning, we can remove the 'submit the last > page' code from iomap_readpages(). Also

Re: [f2fs-dev] [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: [f2fs-dev] [PATCH v6 16/19] fuse: Convert from readpages to readahead

2020-02-18 Thread Dave Chinner
On Mon, Feb 17, 2020 at 10:46:09AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in fuse. Switching away from the > read_cache_pages() helper gets rid of an implicit call to put_page(), > so we can get rid of the get_page() call in

Re: [f2fs-dev] [PATCH 3/3] f2fs: avoid unneeded barrier in do_checkpoint()

2020-02-18 Thread Chao Yu
On 2020/2/19 10:51, Jaegeuk Kim wrote: > On 02/18, Chao Yu wrote: >> We don't need to wait all dirty page submitting IO twice, >> remove unneeded wait step. > > What happens if checkpoint and other meta writs are reordered? checkpoint can be done as following: 1. All meta except last cp-park of

Re: [f2fs-dev] [PATCH v6 17/19] iomap: Restructure iomap_readpages_actor

2020-02-18 Thread John Hubbard
On 2/17/20 10:46 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > By putting the 'have we reached the end of the page' condition at the end > of the loop instead of the beginning, we can remove the 'submit the last > page' code from iomap_readpages(). Also check that

Re: [f2fs-dev] [PATCH v6 14/19] ext4: Convert from readpages to readahead

2020-02-18 Thread Dave Chinner
On Mon, Feb 17, 2020 at 10:46:05AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in ext4 > > Signed-off-by: Matthew Wilcox (Oracle) There's nothing I can see in this that would cause that list corruption I saw with ext4. I'll re-introduce

Re: [f2fs-dev] [PATCH 1/3] f2fs: avoid __GFP_NOFAIL in f2fs_bio_alloc

2020-02-18 Thread Chao Yu
On 2020/2/19 10:49, Jaegeuk Kim wrote: > On 02/18, Chao Yu wrote: >> __f2fs_bio_alloc() won't fail due to memory pool backend, remove unneeded >> __GFP_NOFAIL flag in __f2fs_bio_alloc(). > > It it safe for old kernels as well when thinking backports? ^1da177e4c3f4 (Linus Torvalds 2005-04-16

Re: [f2fs-dev] [PATCH v6 08/19] mm: Add readahead address space operation

2020-02-18 Thread Eric Biggers
On Mon, Feb 17, 2020 at 10:45:54AM -0800, Matthew Wilcox wrote: > diff --git a/Documentation/filesystems/vfs.rst > b/Documentation/filesystems/vfs.rst > index 7d4d09dd5e6d..81ab30fbe45c 100644 > --- a/Documentation/filesystems/vfs.rst > +++ b/Documentation/filesystems/vfs.rst > @@ -706,6 +706,7

Re: [f2fs-dev] [PATCH v6 13/19] erofs: Convert compressed files from readpages to readahead

2020-02-18 Thread Dave Chinner
On Mon, Feb 17, 2020 at 10:46:03AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in erofs. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/erofs/zdata.c | 29 + > 1 file changed, 9 insertions(+), 20

Re: [f2fs-dev] [PATCH v6 12/19] erofs: Convert uncompressed files from readpages to readahead

2020-02-18 Thread Dave Chinner
On Mon, Feb 17, 2020 at 10:46:01AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in erofs > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/erofs/data.c | 39 +--- > fs/erofs/zdata.c

Re: [f2fs-dev] [PATCH 3/3] f2fs: skip migration only when BG_GC is called

2020-02-18 Thread Jaegeuk Kim
On 02/19, Chao Yu wrote: > On 2020/2/19 7:27, Jaegeuk Kim wrote: > > On 02/17, Chao Yu wrote: > >> On 2020/2/15 2:58, Jaegeuk Kim wrote: > >>> FG_GC needs to move entire section more quickly. > >>> > >>> Signed-off-by: Jaegeuk Kim > >>> --- > >>> fs/f2fs/gc.c | 2 +- > >>> 1 file changed, 1

Re: [f2fs-dev] [PATCH 3/3] f2fs: skip migration only when BG_GC is called

2020-02-18 Thread Chao Yu
On 2020/2/19 7:27, Jaegeuk Kim wrote: > On 02/17, Chao Yu wrote: >> On 2020/2/15 2:58, Jaegeuk Kim wrote: >>> FG_GC needs to move entire section more quickly. >>> >>> Signed-off-by: Jaegeuk Kim >>> --- >>> fs/f2fs/gc.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git

Re: [f2fs-dev] [PATCH v6 10/19] fs: Convert mpage_readpages to mpage_readahead

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Implement the new readahead aop and convert all callers (block_dev, > exfat, ext2, fat, gfs2, hpfs, isofs, jfs, nilfs2, ocfs2, omfs, qnx6, > reiserfs & udf). The callers are all trivial except for GFS2 & OCFS2. >

Re: [f2fs-dev] [PATCH 1/3] f2fs: avoid __GFP_NOFAIL in f2fs_bio_alloc

2020-02-18 Thread Jaegeuk Kim
On 02/18, Chao Yu wrote: > __f2fs_bio_alloc() won't fail due to memory pool backend, remove unneeded > __GFP_NOFAIL flag in __f2fs_bio_alloc(). It it safe for old kernels as well when thinking backports? > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 12 > fs/f2fs/f2fs.h |

Re: [f2fs-dev] [PATCH v6 09/19] mm: Add page_cache_readahead_limit

2020-02-18 Thread John Hubbard
On 2/18/20 6:23 PM, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 05:32:31PM -0800, John Hubbard wrote: >>> + page_cache_readahead_limit(inode->i_mapping, NULL, >>> + index, LONG_MAX, num_ra_pages, 0); >> >> >> LONG_MAX seems bold at first, but

Re: [f2fs-dev] [PATCH v6 12/19] erofs: Convert uncompressed files from readpages to readahead

2020-02-18 Thread Gao Xiang
On Mon, Feb 17, 2020 at 10:46:01AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in erofs > > Signed-off-by: Matthew Wilcox (Oracle) > --- It looks good to me, and will test it later as well.. Acked-by: Gao Xiang Thanks, Gao Xiang >

Re: [f2fs-dev] [PATCH v6 11/16] erofs: Convert compressed files from readpages to readahead

2020-02-18 Thread Gao Xiang
On Mon, Feb 17, 2020 at 10:46:00AM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in erofs. > > Signed-off-by: Matthew Wilcox (Oracle) It looks good to me, although some further optimization exists but we could make a straight-forward

Re: [f2fs-dev] [PATCH v6 09/19] mm: Add page_cache_readahead_limit

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 05:32:31PM -0800, John Hubbard wrote: > > + page_cache_readahead_limit(inode->i_mapping, NULL, > > + index, LONG_MAX, num_ra_pages, 0); > > > LONG_MAX seems bold at first, but then again I can't think of anything >

Re: [f2fs-dev] [PATCH v6 09/19] mm: Add page_cache_readahead_limit

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > ext4 and f2fs have duplicated the guts of the readahead code so > they can read past i_size. Instead, separate out the guts of the > readahead code so they can call it directly. > > Signed-off-by: Matthew Wilcox

Re: [f2fs-dev] [PATCH v6 11/19] btrfs: Convert from readpages to readahead

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 01:12:28PM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 05:57:58PM +1100, Dave Chinner wrote: > > On Mon, Feb 17, 2020 at 10:45:59AM -0800, Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > > > - if (nr) { > > > -

Re: [f2fs-dev] [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: [f2fs-dev] [PATCH v6 09/19] mm: Add page_cache_readahead_limit

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 11:54:04AM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 05:31:10PM +1100, Dave Chinner wrote: > > On Mon, Feb 17, 2020 at 10:45:56AM -0800, Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > > > ext4 and f2fs have duplicated the guts of the

Re: [f2fs-dev] [PATCH v6 08/19] mm: Add readahead address space operation

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 08:10:04AM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 05:21:47PM +1100, Dave Chinner wrote: > > On Mon, Feb 17, 2020 at 10:45:54AM -0800, Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > > > This replaces ->readpages with a saner interface:

Re: [f2fs-dev] [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: [f2fs-dev] [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: [f2fs-dev] [PATCH v6 08/19] mm: Add readahead address space operation

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > This replaces ->readpages with a saner interface: > - Return void instead of an ignored error code. > - Pages are already in the page cache when ->readahead is called. > - Implementation looks up the pages in the

Re: [f2fs-dev] [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: [f2fs-dev] [PATCH 3/3] f2fs: skip migration only when BG_GC is called

2020-02-18 Thread Jaegeuk Kim
On 02/17, Chao Yu wrote: > On 2020/2/15 2:58, Jaegeuk Kim wrote: > > FG_GC needs to move entire section more quickly. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/gc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > > index

Re: [f2fs-dev] [PATCH 3/4] f2fs: clean up lfs/adaptive mount option

2020-02-18 Thread Jaegeuk Kim
On 02/17, Chao Yu wrote: > On 2020/2/15 2:41, Jaegeuk Kim wrote: > >> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > >> index 5152e9bf432b..d2d50827772c 100644 > >> --- a/fs/f2fs/f2fs.h > >> +++ b/fs/f2fs/f2fs.h > >> @@ -91,8 +91,6 @@ extern const char *f2fs_fault_name[FAULT_MAX]; > >> #define

Re: [f2fs-dev] [PATCH v6 06/19] mm: rename readahead loop variable to 'i'

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Change the type of page_idx to unsigned long, and rename it -- it's > just a loop counter, not a page index. > > Suggested-by: John Hubbard > Signed-off-by: Matthew Wilcox (Oracle) > --- > mm/readahead.c | 6

Re: [f2fs-dev] [PATCH v6 05/19] mm: Remove 'page_offset' from readahead loop

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Eliminate the page_offset variable which was confusing with the > 'offset' parameter and record the start of each consecutive run of > pages in the readahead_control. ...presumably for the benefit of a subsequent

Re: [f2fs-dev] [PATCH v6 04/16] mm: Tweak readahead loop slightly

2020-02-18 Thread John Hubbard
On 2/18/20 2:57 PM, John Hubbard wrote: > On 2/17/20 10:45 AM, Matthew Wilcox wrote: >> From: "Matthew Wilcox (Oracle)" >> >> Eliminate the page_offset variable which was just confusing; >> record the start of each consecutive run of pages in the > > Darn it, I incorrectly reviewed the N/16

Re: [f2fs-dev] [PATCH v6 04/16] mm: Tweak readahead loop slightly

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Eliminate the page_offset variable which was just confusing; > record the start of each consecutive run of pages in the OK...presumably for the benefit of a following patch, since it is not actually consumed in

Re: [f2fs-dev] [PATCH v6 03/19] mm: Use readahead_control to pass arguments

2020-02-18 Thread Matthew Wilcox
On Wed, Feb 19, 2020 at 09:46:10AM +1100, Dave Chinner wrote: > On Tue, Feb 18, 2020 at 05:56:18AM -0800, Matthew Wilcox wrote: > > On Tue, Feb 18, 2020 at 04:03:00PM +1100, Dave Chinner wrote: > > > On Mon, Feb 17, 2020 at 10:45:44AM -0800, Matthew Wilcox wrote: > > > > +static void

Re: [f2fs-dev] [PATCH v6 04/19] mm: Rearrange readahead loop

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 05:57:36AM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 04:08:24PM +1100, Dave Chinner wrote: > > On Mon, Feb 17, 2020 at 10:45:45AM -0800, Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > > > Move the declaration of 'page' to inside the loop

Re: [f2fs-dev] [PATCH v6 03/19] mm: Use readahead_control to pass arguments

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 05:56:18AM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 04:03:00PM +1100, Dave Chinner wrote: > > On Mon, Feb 17, 2020 at 10:45:44AM -0800, Matthew Wilcox wrote: > > > +static void read_pages(struct readahead_control *rac, struct list_head > > > *pages, > > > +

Re: [f2fs-dev] [PATCH v6 04/19] mm: Rearrange readahead loop

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Move the declaration of 'page' to inside the loop and move the 'kick > off a fresh batch' code to the end of the function for easier use in > subsequent patches. > > Signed-off-by: Matthew Wilcox (Oracle) > --- >

Re: [f2fs-dev] [PATCH v6 03/19] mm: Use readahead_control to pass arguments

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > In this patch, only between __do_page_cache_readahead() and > read_pages(), but it will be extended in upcoming patches. Also add > the readahead_count() accessor. > > Signed-off-by: Matthew Wilcox (Oracle) > ---

Re: [f2fs-dev] [PATCH v6 02/19] mm: Ignore return value of ->readpages

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > We used to assign the return value to a variable, which we then ignored. > Remove the pretence of caring. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Christoph Hellwig > --- > mm/readahead.c | 8

Re: [f2fs-dev] [PATCH v6 00/19] Change readahead API

2020-02-18 Thread Dave Chinner
On Tue, Feb 18, 2020 at 05:42:30AM -0800, Matthew Wilcox wrote: > On Tue, Feb 18, 2020 at 03:56:33PM +1100, Dave Chinner wrote: > > Latest version in your git tree: > > > > $ ▶ glo -n 5 willy/readahead > > 4be497096c04 mm: Use memalloc_nofs_save in readahead path > > ff63497fcb98 iomap: Convert

Re: [f2fs-dev] [PATCH v6 01/19] mm: Return void from various readahead functions

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 01:05:29PM -0800, John Hubbard wrote: > This is an easy review and obviously correct, so: > > Reviewed-by: John Hubbard Thanks > Thoughts for the future of the API: > > I will add that I could envision another patchset that went in the > opposite direction, and

Re: [f2fs-dev] [PATCH v6 01/19] mm: Return void from various readahead functions

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > ondemand_readahead has two callers, neither of which use the return value. > That means that both ra_submit and __do_page_cache_readahead() can return > void, and we don't need to worry that a present page in the

Re: [f2fs-dev] [PATCH v6 00/19] Change readahead API

2020-02-18 Thread John Hubbard
On 2/17/20 10:45 AM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > This series adds a readahead address_space operation to eventually > replace the readpages operation. The key difference is that > pages are added to the page cache as they are allocated (and > then looked up by

Re: [f2fs-dev] [PATCH v6 09/19] mm: Add page_cache_readahead_limit

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 05:31:10PM +1100, Dave Chinner wrote: > On Mon, Feb 17, 2020 at 10:45:56AM -0800, Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" > > > > ext4 and f2fs have duplicated the guts of the readahead code so > > they can read past i_size. Instead, separate out the

Re: [f2fs-dev] [PATCH v6 08/19] mm: Add readahead address space operation

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 05:21:47PM +1100, Dave Chinner wrote: > On Mon, Feb 17, 2020 at 10:45:54AM -0800, Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" > > > > This replaces ->readpages with a saner interface: > > - Return void instead of an ignored error code. > > - Pages are

Re: [f2fs-dev] [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: [f2fs-dev] [PATCH v6 04/19] mm: Rearrange readahead loop

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 04:08:24PM +1100, Dave Chinner wrote: > On Mon, Feb 17, 2020 at 10:45:45AM -0800, Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" > > > > Move the declaration of 'page' to inside the loop and move the 'kick > > off a fresh batch' code to the end of the function

Re: [f2fs-dev] [PATCH v6 03/19] mm: Use readahead_control to pass arguments

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 04:03:00PM +1100, Dave Chinner wrote: > On Mon, Feb 17, 2020 at 10:45:44AM -0800, Matthew Wilcox wrote: > > +static void read_pages(struct readahead_control *rac, struct list_head > > *pages, > > + gfp_t gfp) > > { > > + const struct address_space_operations

Re: [f2fs-dev] [PATCH v6 00/19] Change readahead API

2020-02-18 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 03:56:33PM +1100, Dave Chinner wrote: > Latest version in your git tree: > > $ ▶ glo -n 5 willy/readahead > 4be497096c04 mm: Use memalloc_nofs_save in readahead path > ff63497fcb98 iomap: Convert from readpages to readahead > 26aee60e89b5 iomap: Restructure

Re: [f2fs-dev] [PATCH 00/44] Manually convert filesystem FS documents to ReST

2020-02-18 Thread Mauro Carvalho Chehab
Em Mon, 17 Feb 2020 20:01:46 -0800 Matthew Wilcox escreveu: > On Mon, Feb 17, 2020 at 05:11:46PM +0100, Mauro Carvalho Chehab wrote: > > There are lots of plain text documents under Documentation/filesystems. > > > > Manually convert several of those to ReST and add them to the index file. >

[f2fs-dev] [PATCH 2/3] f2fs: fix to avoid triggering IO in write path

2020-02-18 Thread Chao Yu
If we are in write IO path, we need to avoid using GFP_KERNEL. Signed-off-by: Chao Yu --- fs/f2fs/compress.c | 2 +- fs/f2fs/data.c | 24 +--- fs/f2fs/f2fs.h | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/fs/f2fs/compress.c

[f2fs-dev] [PATCH 1/3] f2fs: avoid __GFP_NOFAIL in f2fs_bio_alloc

2020-02-18 Thread Chao Yu
__f2fs_bio_alloc() won't fail due to memory pool backend, remove unneeded __GFP_NOFAIL flag in __f2fs_bio_alloc(). Signed-off-by: Chao Yu --- fs/f2fs/data.c | 12 fs/f2fs/f2fs.h | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c

[f2fs-dev] [PATCH 3/3] f2fs: avoid unneeded barrier in do_checkpoint()

2020-02-18 Thread Chao Yu
We don't need to wait all dirty page submitting IO twice, remove unneeded wait step. Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 751815cb4c2b..9c88fb3d255a 100644 ---