Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5342862rwl; Mon, 3 Apr 2023 19:03:51 -0700 (PDT) X-Google-Smtp-Source: AKy350b8HPEtB+gAV5sSMOseRDU7iKxc17VPiQOZzwygLgYbspcrn5lhCavxBlx7xnqPP7xM+vlk X-Received: by 2002:a05:6a20:29a0:b0:d9:3e8a:dc48 with SMTP id f32-20020a056a2029a000b000d93e8adc48mr594884pzh.62.1680573830751; Mon, 03 Apr 2023 19:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680573830; cv=none; d=google.com; s=arc-20160816; b=gWeCifndpj4hOVLz2c3RZiirEeEcNfviRX9E4Q43Idqi6hY1nJ/5MxYlzKenmFslrn rjKKPNlIUHfWISzp+I2KohLcH8QeQFChP0+GEwjknIX1dM22ItucNPwWECzSeO5MN/xs bo/T0OkKme8grHDY9BQ9r7rNaCNQWw3HJN0KhaCWXcWGSwHTFiO8ZQ2QfBTLdsX8KMu3 MMMkabiOURs/F8n1khwNwPP8DBy9J6MfXFvIW7qku+U4i6v2RLqP6tKVO3tlQ32s1/FN dMLAg/AuV3pWYuqrFokEQ56PehMV5ScyvwuRZtXwZ3jPEN7+xE1dbEtdtE4IzU/rhrHp f/3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=M8o/nm6EdQLwbh92XM6WjwAuVlYp69Bu2tplHYa3p5A=; b=frkIElJSXUUrb3rjMmLL4N3GaF6Y6C/j1ZcwcdVp0ATrE5k/Qjs5a0naWGj97waJ0U a+6y1bKl49SH0Xv22LV3iuLezd0XM/JRoJ+v49O/Kyq0PUl3Rco5/wNE/VeV8Imqh+/Y yIMMvxI7AhPE6kngi12YBACJ6tpx+o+fkUmJd8pVVwvT/Wy0ChCQqh+UGwl5EL7n2w5W gmQSBNY6tvHoP6kNwbdfu7UzAWHIhoj8hICsMZlKsetNkuvw2+5TrkJjLlTrFaox+jlj v7MBfHjVZUjnF5CXbTRLnPhvMdEQKwZi97ZOpQhEpOb0WWNx01RgYdwFkr1xbnff58Ts Ifvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HHYYZ+Mb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s128-20020a625e86000000b0062cb399ad8esi9504150pfb.140.2023.04.03.19.03.39; Mon, 03 Apr 2023 19:03:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HHYYZ+Mb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232954AbjDDBoo (ORCPT + 99 others); Mon, 3 Apr 2023 21:44:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231450AbjDDBon (ORCPT ); Mon, 3 Apr 2023 21:44:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23DCBC9 for ; Mon, 3 Apr 2023 18:44:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AEB3961FCC for ; Tue, 4 Apr 2023 01:44:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F47AC433EF; Tue, 4 Apr 2023 01:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680572681; bh=exwk2t7snWJmtT+uSVR7FwHn+JnLEMsJrmvzsUtNEWQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HHYYZ+MbOXgUJTKi7BtmUnpbJtRT5xsu6uRLk/uT6g6htCwCWG2r4f3iR1RwIWofg sLtEUuoU1bEjbzNOtraMo/pKj0zmGdRlIDFe9YqWrw6i55ptIruH4C5xGZxp+EM27S 9pMWiOv9Jp57PRD/klLIptmf6ACEq1UUKQr/OVq1o7n3grvRYCzzC4VcybfLwtPZG9 cd0PIuQUn7IQdXwnTU/uJluODwjBWFglpfM0HViscDR36J0f6xZyWhOBHQjhywUMrP RUKP4KhHULcXZow78Em2+LtwO615BNX0B2bDd2GRgvhsUg5xyZqeu6BnyYTvPk51ih /0daR/x4F400A== Message-ID: <79aec97f-e49f-63c8-13a6-85e1207250d3@kernel.org> Date: Tue, 4 Apr 2023 09:44:37 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] f2fs: support to show noage_extent_cache mount option Content-Language: en-US To: Yangtao Li , Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20230330173127.46900-1-frank.li@vivo.com> From: Chao Yu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/4/4 1:40, Jaegeuk Kim wrote: > On 03/31, Yangtao Li wrote: >> This patch support noage_extent_cache mount option. >> >> Signed-off-by: Yangtao Li >> --- >> 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? Hi Yangtao, Please check the reason why we need to add no{inline_data, extent_cache, ...} mount option as below: commit 75342797988a0f9ebec400a2dde8d4de581c4079 Author: Wanpeng Li Date: Tue Mar 24 10:20:27 2015 +0800 f2fs: enable inline data by default Enable inline_data feature by default since it brings us better performance and space utilization and now has already stable. Add another option noinline_data to disable it during mount. Thanks, > >> ======================== ============================================================ >> >> 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