erofs: enable large folio in device-based mode
PATCH 1/1 erofs: enable large folio in device-based mode
Enable large folio in device-based mode. Then the radahead routine will pass down large folio containing multiple pages.
Enable this feature for non-compressed format for now, until the compression part supports large folio later.
---
I have tested it under workload of Linux compiling. I know it's not a perfect workload testing this feature, because large folio is less likely hit in this case since source files are generally small. But I indeed observed large folios (e.g. 16 pages) by peeking readahead_count(rac) in erofs_readahead().
--- fs/erofs/inode.c | 2 ++ 1 file changed, 2 insertions(+)
fs/erofs/inode.c +2 -0
@@ -295,6 +295,8 @@ static int erofs_fill_inode(struct inode *inode) goto out_unlock; } inode->i_mapping->a_ops = &erofs_raw_access_aops; +if (!erofs_is_fscache_mode (inode->i_sb)) +mapping_set_large_folios (inode->i_mapping);#ifdef CONFIG_EROFS_FS_ONDEMAND if (erofs_is_fscache_mode (inode->i_sb)) inode->i_mapping->a_ops = &erofs_fscache_access_aops;
Signature · 1 line
2.19.1.6.gb485710b
Quoted 6 lines · Jingbo Xu
Enable large folio in device-based mode. Then the radahead routine will pass down large folio containing multiple pages.
Enable this feature for non-compressed format for now, until the compression part supports large folio later.
Quoted 7 lines
Signed-off-by Jingbo Xu <[email protected]>---
I have tested it under workload of Linux compiling. I know it's not a perfect workload testing this feature, because large folio is less likely hit in this case since source files are generally small. But I indeed observed large folios (e.g. 16 pages) by peekingreadahead_count(rac)inerofs_readahead().
Sorry, readahead_count(rac) returns the whole number of pages inside the rac, which can not prove large folio passed in.
I retired later and observed large folio (e.g. with order 2) by peeking folio_order(ctx->cur_folio) inside iomap_readahead_iter()
Quoted 17 lines
--- fs/erofs/inode.c | 2 ++ 1 file changed, 2 insertions(+)fs/erofs/inode.c +2
-0@@ -295,6 +295,8 @@ static int erofs_fill_inode(struct inode *inode) goto out_unlock; } inode->i_mapping->a_ops = &erofs_raw_access_aops; +if (!erofs_is_fscache_mode (inode->i_sb)) +mapping_set_large_folios (inode->i_mapping);#ifdef CONFIG_EROFS_FS_ONDEMAND if (erofs_is_fscache_mode (inode->i_sb)) inode->i_mapping->a_ops = &erofs_fscache_access_aops;
Signature · 2 lines
Thanks, Jingbo
Hi,
Quoted 17 lines · JeffleXu
Quoted 6 lines · Jingbo Xu
Enable large folio in device-based mode. Then the radahead routine will pass down large folio containing multiple pages.
Enable this feature for non-compressed format for now, until the compression part supports large folio later.
Quoted 7 lines
Signed-off-by Jingbo Xu <[email protected]>---
I have tested it under workload of Linux compiling. I know it's not a perfect workload testing this feature, because large folio is less likely hit in this case since source files are generally small. But I indeed observed large folios (e.g. 16 pages) by peekingreadahead_count(rac)inerofs_readahead().
Quoted 5 lines
Sorry,
readahead_count(rac)returns the whole number of pages inside the rac, which can not prove large folio passed in.I retired later and observed large folio (e.g. with order 2) by peeking
folio_order(ctx->cur_folio)insideiomap_readahead_iter()
I will test it as well after I send out all bug fixes for this cycle.
Thanks,
Gao Xiang
Quoted 22 lines
Quoted 18 lines
--- fs/erofs/inode.c | 2 ++ 1 file changed, 2 insertions(+)fs/erofs/inode.c +2
-0@@ -295,6 +295,8 @@ static int erofs_fill_inode(struct inode *inode) goto out_unlock; } inode->i_mapping->a_ops = &erofs_raw_access_aops; +if (!erofs_is_fscache_mode (inode->i_sb)) +mapping_set_large_folios (inode->i_mapping);#ifdef CONFIG_EROFS_FS_ONDEMAND if (erofs_is_fscache_mode (inode->i_sb)) inode->i_mapping->a_ops = &erofs_fscache_access_aops;Signature · 2 lines
Thanks, Jingbo
Gao Xiang
maintainerQuoted 20 lines · Gao Xiang
Hi,
Quoted 17 lines · JeffleXu
Quoted 13 lines · Jingbo Xu
Enable large folio in device-based mode. Then the radahead routine will pass down large folio containing multiple pages.
Enable this feature for non-compressed format for now, until the compression part supports large folio later.
Signed-off-by Jingbo Xu <[email protected]>---
I have tested it under workload of Linux compiling. I know it's not a perfect workload testing this feature, because large folio is less likely hit in this case since source files are generally small. But I indeed observed large folios (e.g. 16 pages) by peekingreadahead_count(rac)inerofs_readahead().
Quoted 7 lines
Quoted 5 lines
Sorry,
readahead_count(rac)returns the whole number of pages inside the rac, which can not prove large folio passed in.I retired later and observed large folio (e.g. with order 2) by peeking
folio_order(ctx->cur_folio)insideiomap_readahead_iter()I will test it as well after I send out all bug fixes for this cycle.
I've updated the subject and commit message as:
"
erofs: enable large folios for iomap mode
Enable large folios for iomap mode. Then the readahead routine will pass down large folios containing multiple pages.
Let's enable this for non-compressed format for now, until the compression part supports large folios later.
"
Thanks,
Gao Xiang