[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221110074023.8059-1-jefflexu@linux.alibaba.com>
Date: Thu, 10 Nov 2022 15:40:23 +0800
From: Jingbo Xu <jefflexu@...ux.alibaba.com>
To: xiang@...nel.org, chao@...nel.org, linux-erofs@...ts.ozlabs.org
Cc: huyue2@...lpad.com, linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Jingbo Xu <jefflexu@...ux.alibaba.com>
---
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(+)
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index ad2a82f2eb4c..e457b8a59ee7 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs/inode.c
@@ -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;
--
2.19.1.6.gb485710b
Powered by blists - more mailing lists