From: Gao Xiang <xiang@kernel.org>
To: Jingbo Xu <jefflexu@linux.alibaba.com>
Cc: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] erofs: enable large folio support for non-compressed format
Date: Sat, 26 Nov 2022 10:16:48 +0800 [thread overview]
Message-ID: <Y4F3EGk+0najgTco@debian> (raw)
In-Reply-To: <20221126005756.7662-3-jefflexu@linux.alibaba.com>
Hi Jingbo,
On Sat, Nov 26, 2022 at 08:57:56AM +0800, Jingbo Xu wrote:
> Enable large folio in both device and fscache mode. Then the readahead
^ large folios in both iomap and fscache modes.
I tend to enable iomap/fscache large folios with two patches.
Also please see dev-test branch.
> 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.
^ large folios
>
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
> ---
> fs/erofs/fscache.c | 1 +
> fs/erofs/inode.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c
> index 0643b205c7eb..d2dd58ce312b 100644
> --- a/fs/erofs/fscache.c
> +++ b/fs/erofs/fscache.c
> @@ -436,6 +436,7 @@ struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb,
> inode->i_size = OFFSET_MAX;
> inode->i_mapping->a_ops = &erofs_fscache_meta_aops;
> mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
> + mapping_set_large_folios(inode->i_mapping);
>
Meta inodes currently doesn't need large folios for now, and
we don't have readahead policy for these.
> ctx->inode = inode;
> }
> diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
> index ad2a82f2eb4c..85932086d23f 100644
> --- a/fs/erofs/inode.c
> +++ b/fs/erofs/inode.c
> @@ -295,6 +295,7 @@ static int erofs_fill_inode(struct inode *inode)
> goto out_unlock;
> }
> inode->i_mapping->a_ops = &erofs_raw_access_aops;
> + 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
>
next prev parent reply other threads:[~2022-11-26 2:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-26 0:57 [PATCH 0/2] erofs: support large folio in fscache mode Jingbo Xu
2022-11-26 0:57 ` [PATCH 1/2] " Jingbo Xu
2022-11-26 0:57 ` [PATCH 2/2] erofs: enable large folio support for non-compressed format Jingbo Xu
2022-11-26 2:16 ` Gao Xiang [this message]
2022-11-26 2:50 ` Jingbo Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y4F3EGk+0najgTco@debian \
--to=xiang@kernel.org \
--cc=chao@kernel.org \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox