All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Yangtao Li <frank.li@vivo.com>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: support to show noage_extent_cache mount option
Date: Mon, 3 Apr 2023 10:40:14 -0700	[thread overview]
Message-ID: <ZCsPfukvFHhiI6vN@google.com> (raw)
In-Reply-To: <20230330173127.46900-1-frank.li@vivo.com>

On 03/31, Yangtao Li wrote:
> This patch support noage_extent_cache mount option.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  Documentation/filesystems/f2fs.rst | 2 ++
>  fs/f2fs/super.c                    | 7 +++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst
> index a81c896464ff..75505ab88de8 100644
> --- a/Documentation/filesystems/f2fs.rst
> +++ b/Documentation/filesystems/f2fs.rst
> @@ -352,6 +352,8 @@ age_extent_cache	 Enable an age extent cache based on rb-tree. It records
>  			 data block update frequency of the extent per inode, in
>  			 order to provide better temperature hints for data block
>  			 allocation.
> +noage_extent_cache		 Disable an age extent cache based on rb-tree, see
> +			 the above age_extent_cache mount option.

Hmm, why do we need?

>  ======================== ============================================================
>  
>  Debugfs Entries
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index b5828a67f7c1..8bd9953ea7e3 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -165,6 +165,7 @@ enum {
>  	Opt_discard_unit,
>  	Opt_memory_mode,
>  	Opt_age_extent_cache,
> +	Opt_noage_extent_cache,
>  	Opt_err,
>  };
>  
> @@ -244,6 +245,7 @@ static match_table_t f2fs_tokens = {
>  	{Opt_discard_unit, "discard_unit=%s"},
>  	{Opt_memory_mode, "memory=%s"},
>  	{Opt_age_extent_cache, "age_extent_cache"},
> +	{Opt_noage_extent_cache, "noage_extent_cache"},
>  	{Opt_err, NULL},
>  };
>  
> @@ -1269,6 +1271,9 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
>  		case Opt_age_extent_cache:
>  			set_opt(sbi, AGE_EXTENT_CACHE);
>  			break;
> +		case Opt_noage_extent_cache:
> +			clear_opt(sbi, AGE_EXTENT_CACHE);
> +			break;
>  		default:
>  			f2fs_err(sbi, "Unrecognized mount option \"%s\" or missing value",
>  				 p);
> @@ -1974,6 +1979,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
>  		seq_puts(seq, ",noextent_cache");
>  	if (test_opt(sbi, AGE_EXTENT_CACHE))
>  		seq_puts(seq, ",age_extent_cache");
> +	else
> +		seq_puts(seq, ",noage_extent_cache");
>  	if (test_opt(sbi, DATA_FLUSH))
>  		seq_puts(seq, ",data_flush");
>  
> -- 
> 2.35.1


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Yangtao Li <frank.li@vivo.com>
Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: support to show noage_extent_cache mount option
Date: Mon, 3 Apr 2023 10:40:14 -0700	[thread overview]
Message-ID: <ZCsPfukvFHhiI6vN@google.com> (raw)
In-Reply-To: <20230330173127.46900-1-frank.li@vivo.com>

On 03/31, Yangtao Li wrote:
> This patch support noage_extent_cache mount option.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  Documentation/filesystems/f2fs.rst | 2 ++
>  fs/f2fs/super.c                    | 7 +++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst
> index a81c896464ff..75505ab88de8 100644
> --- a/Documentation/filesystems/f2fs.rst
> +++ b/Documentation/filesystems/f2fs.rst
> @@ -352,6 +352,8 @@ age_extent_cache	 Enable an age extent cache based on rb-tree. It records
>  			 data block update frequency of the extent per inode, in
>  			 order to provide better temperature hints for data block
>  			 allocation.
> +noage_extent_cache		 Disable an age extent cache based on rb-tree, see
> +			 the above age_extent_cache mount option.

Hmm, why do we need?

>  ======================== ============================================================
>  
>  Debugfs Entries
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index b5828a67f7c1..8bd9953ea7e3 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -165,6 +165,7 @@ enum {
>  	Opt_discard_unit,
>  	Opt_memory_mode,
>  	Opt_age_extent_cache,
> +	Opt_noage_extent_cache,
>  	Opt_err,
>  };
>  
> @@ -244,6 +245,7 @@ static match_table_t f2fs_tokens = {
>  	{Opt_discard_unit, "discard_unit=%s"},
>  	{Opt_memory_mode, "memory=%s"},
>  	{Opt_age_extent_cache, "age_extent_cache"},
> +	{Opt_noage_extent_cache, "noage_extent_cache"},
>  	{Opt_err, NULL},
>  };
>  
> @@ -1269,6 +1271,9 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
>  		case Opt_age_extent_cache:
>  			set_opt(sbi, AGE_EXTENT_CACHE);
>  			break;
> +		case Opt_noage_extent_cache:
> +			clear_opt(sbi, AGE_EXTENT_CACHE);
> +			break;
>  		default:
>  			f2fs_err(sbi, "Unrecognized mount option \"%s\" or missing value",
>  				 p);
> @@ -1974,6 +1979,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
>  		seq_puts(seq, ",noextent_cache");
>  	if (test_opt(sbi, AGE_EXTENT_CACHE))
>  		seq_puts(seq, ",age_extent_cache");
> +	else
> +		seq_puts(seq, ",noage_extent_cache");
>  	if (test_opt(sbi, DATA_FLUSH))
>  		seq_puts(seq, ",data_flush");
>  
> -- 
> 2.35.1

  reply	other threads:[~2023-04-03 17:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 17:31 [f2fs-dev] [PATCH] f2fs: support to show noage_extent_cache mount option Yangtao Li via Linux-f2fs-devel
2023-03-30 17:31 ` Yangtao Li
2023-04-03 17:40 ` Jaegeuk Kim [this message]
2023-04-03 17:40   ` Jaegeuk Kim
2023-04-04  1:44   ` [f2fs-dev] " Chao Yu
2023-04-04  1:44     ` Chao Yu

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=ZCsPfukvFHhiI6vN@google.com \
    --to=jaegeuk@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.