From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEE96C3DA61 for ; Sat, 27 Jul 2024 03:25:58 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sXY4C-00088J-7G; Sat, 27 Jul 2024 03:25:56 +0000 Received: from [172.30.29.67] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sXY4B-00088B-JJ for linux-f2fs-devel@lists.sourceforge.net; Sat, 27 Jul 2024 03:25:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DXCWiVdNZAwnHnkGcJCSpF5wib8TLr/CME4SSeql6HE=; b=WlKMSgkDvCS6Qd5AQ+6Q5vh01T B2PclEZAiJcHntXl1R1/RuuJjzpFXLmXG9qkOSfNTEwNOP0drIZhXmNIDfYu2UK5vnm8ebD2YOGlp OQgUvrzJt/9cKM3zckDFvfNxwuSB6vNrqS7kWE6ynGanG/b154f19RPAsOMJxQ88rqqY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DXCWiVdNZAwnHnkGcJCSpF5wib8TLr/CME4SSeql6HE=; b=CzRITgJkTP2COHIG2kOipu9oHn P4tP4rBHliwzHOmGJfkrHfJ5cRAbVSN7JTB8tgcfv6ShIl+SXbsB7mPg7yqgOKivRW/+9nRr5TRVy T1S5OUnr+1eR4Bm136mG1SRjcNgfF3ywzjJS5kIGmWSsmGBSUA0m5xU6oe6D4/UpfLpM=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1sXY4B-0008G7-IS for linux-f2fs-devel@lists.sourceforge.net; Sat, 27 Jul 2024 03:25:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 29E8D60DF5; Sat, 27 Jul 2024 03:25:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65736C32781; Sat, 27 Jul 2024 03:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722050744; bh=w91TPZxrPsLeGlqQhW0PLg/jt9TLaAwIo3cgRjJDId0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nXnJmNVUzTa2/THaMDB+O+XHDPW1Uvfrm9w3kiaRn6s6vnvRCz8jNH0JG/8R3g8KK uKqaClfuehITn6N9CSomcqqWgWbT12iDvXj3syrhTlUNbrj5e4KNJLtqnh8Ajo9Tez 5jmB0MPP0W+NZt67aaNKKuR0mXvzb2+90/XHC7kgk/e41+r4V73u1IN5tucMLSyfLw er9q14gjURPO8rL+gQRGAS5F123pHWaWDJgxBMy+hG3u0gZO7LAY6EjHEFnhvX3M07 PXGKXWlsQvyXIt1a2Tag9f1MUJeJMh9PxOxRQwrw9wIe03X1PXEiuKr0R/6dax+sFV xrLGPVyYHJTQQ== Date: Sat, 27 Jul 2024 03:25:42 +0000 From: Jaegeuk Kim To: Chao Yu Message-ID: References: <20240221073249.1710026-1-jinbaoliu365@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1sXY4B-0008G7-IS Subject: Re: [f2fs-dev] [PATCH] f2fs: sysfs: support atgc_enabled X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: liujinbao1 , liujinbao1 , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 07/26, Chao Yu wrote: > On 2024/2/21 15:32, liujinbao1 wrote: > > From: liujinbao1 > > > > When we add "atgc" to the fstab table, ATGC is not immediately enabled. > > There is a 7-day time threshold, and we can use "atgc_enabled" to > > show whether ATGC is enabled. > > Oh, I missed to reply on this patch, what about adding this readonly > atgc_enabled sysfs entry into /sys/fs/f2fs//stat/ directory? It looks like not stat. > > Thanks, > > > > > Signed-off-by: liujinbao1 > > --- > > Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++++++ > > fs/f2fs/sysfs.c | 8 ++++++++ > > 2 files changed, 14 insertions(+) > > > > diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs > > index 36c3cb547901..8597dfaef700 100644 > > --- a/Documentation/ABI/testing/sysfs-fs-f2fs > > +++ b/Documentation/ABI/testing/sysfs-fs-f2fs > > @@ -564,6 +564,12 @@ Description: When ATGC is on, it controls age threshold to bypass GCing young > > candidates whose age is not beyond the threshold, by default it was > > initialized as 604800 seconds (equals to 7 days). > > +What: /sys/fs/f2fs//atgc_enabled > > +Date: Feb 2024 > > +Contact: "Jinbao Liu" > > +Description: It represents whether ATGC is on or off. The value is 1 which > > + indicates that ATGC is on, and 0 indicates that it is off. > > + > > What: /sys/fs/f2fs//gc_reclaimed_segments > > Date: July 2021 > > Contact: "Daeho Jeong" > > diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c > > index 417fae96890f..0915872abd97 100644 > > --- a/fs/f2fs/sysfs.c > > +++ b/fs/f2fs/sysfs.c > > @@ -143,6 +143,12 @@ static ssize_t pending_discard_show(struct f2fs_attr *a, > > &SM_I(sbi)->dcc_info->discard_cmd_cnt)); > > } > > +static ssize_t atgc_enabled_show(struct f2fs_attr *a, > > + struct f2fs_sb_info *sbi, char *buf) > > +{ > > + return sysfs_emit(buf, "%d\n", sbi->am.atgc_enabled ? 1 : 0); > > +} > > + > > static ssize_t gc_mode_show(struct f2fs_attr *a, > > struct f2fs_sb_info *sbi, char *buf) > > { > > @@ -1017,6 +1023,7 @@ F2FS_GENERAL_RO_ATTR(encoding); > > F2FS_GENERAL_RO_ATTR(mounted_time_sec); > > F2FS_GENERAL_RO_ATTR(main_blkaddr); > > F2FS_GENERAL_RO_ATTR(pending_discard); > > +F2FS_GENERAL_RO_ATTR(atgc_enabled); > > F2FS_GENERAL_RO_ATTR(gc_mode); > > #ifdef CONFIG_F2FS_STAT_FS > > F2FS_GENERAL_RO_ATTR(moved_blocks_background); > > @@ -1144,6 +1151,7 @@ static struct attribute *f2fs_attrs[] = { > > ATTR_LIST(atgc_candidate_count), > > ATTR_LIST(atgc_age_weight), > > ATTR_LIST(atgc_age_threshold), > > + ATTR_LIST(atgc_enabled), > > ATTR_LIST(seq_file_ra_mul), > > ATTR_LIST(gc_segment_mode), > > ATTR_LIST(gc_reclaimed_segments), _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24B384A05 for ; Sat, 27 Jul 2024 03:25:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722050745; cv=none; b=g0v+mbBipPIJQmtn7stqfsGlOa2yjQrQG+zcUu3nKc8QYlzyhajO0g3pKzG3NyilwFldx7MWBhBKydy7zjaZfEjDuJxK1RL9HpNjWUTw57mBxwAYJpjng9/YN0I6cw0XgyABt9cGyi3rjl4TuEr22z69wrovP7vt0rHQCjU56wk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722050745; c=relaxed/simple; bh=w91TPZxrPsLeGlqQhW0PLg/jt9TLaAwIo3cgRjJDId0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=alD//gjNHRqXK6peNZlV8bClv7DmgD21JKeRpPOpffaNnN1xdj42iqy2XjWq8Jt4ZHtaVau3P8KXdlOzsdObNzUMLj2eYE4Z0Cu8m49diSZY/oPCKb6gAgT3gjKmz8s1KQXK3W9Mcn+Nk4zToE8p1IBwZTbIYhGgqkpSwhAm0b0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nXnJmNVU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nXnJmNVU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65736C32781; Sat, 27 Jul 2024 03:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722050744; bh=w91TPZxrPsLeGlqQhW0PLg/jt9TLaAwIo3cgRjJDId0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nXnJmNVUzTa2/THaMDB+O+XHDPW1Uvfrm9w3kiaRn6s6vnvRCz8jNH0JG/8R3g8KK uKqaClfuehITn6N9CSomcqqWgWbT12iDvXj3syrhTlUNbrj5e4KNJLtqnh8Ajo9Tez 5jmB0MPP0W+NZt67aaNKKuR0mXvzb2+90/XHC7kgk/e41+r4V73u1IN5tucMLSyfLw er9q14gjURPO8rL+gQRGAS5F123pHWaWDJgxBMy+hG3u0gZO7LAY6EjHEFnhvX3M07 PXGKXWlsQvyXIt1a2Tag9f1MUJeJMh9PxOxRQwrw9wIe03X1PXEiuKr0R/6dax+sFV xrLGPVyYHJTQQ== Date: Sat, 27 Jul 2024 03:25:42 +0000 From: Jaegeuk Kim To: Chao Yu Cc: liujinbao1 , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, liujinbao1 Subject: Re: [PATCH] f2fs: sysfs: support atgc_enabled Message-ID: References: <20240221073249.1710026-1-jinbaoliu365@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On 07/26, Chao Yu wrote: > On 2024/2/21 15:32, liujinbao1 wrote: > > From: liujinbao1 > > > > When we add "atgc" to the fstab table, ATGC is not immediately enabled. > > There is a 7-day time threshold, and we can use "atgc_enabled" to > > show whether ATGC is enabled. > > Oh, I missed to reply on this patch, what about adding this readonly > atgc_enabled sysfs entry into /sys/fs/f2fs//stat/ directory? It looks like not stat. > > Thanks, > > > > > Signed-off-by: liujinbao1 > > --- > > Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++++++ > > fs/f2fs/sysfs.c | 8 ++++++++ > > 2 files changed, 14 insertions(+) > > > > diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs > > index 36c3cb547901..8597dfaef700 100644 > > --- a/Documentation/ABI/testing/sysfs-fs-f2fs > > +++ b/Documentation/ABI/testing/sysfs-fs-f2fs > > @@ -564,6 +564,12 @@ Description: When ATGC is on, it controls age threshold to bypass GCing young > > candidates whose age is not beyond the threshold, by default it was > > initialized as 604800 seconds (equals to 7 days). > > +What: /sys/fs/f2fs//atgc_enabled > > +Date: Feb 2024 > > +Contact: "Jinbao Liu" > > +Description: It represents whether ATGC is on or off. The value is 1 which > > + indicates that ATGC is on, and 0 indicates that it is off. > > + > > What: /sys/fs/f2fs//gc_reclaimed_segments > > Date: July 2021 > > Contact: "Daeho Jeong" > > diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c > > index 417fae96890f..0915872abd97 100644 > > --- a/fs/f2fs/sysfs.c > > +++ b/fs/f2fs/sysfs.c > > @@ -143,6 +143,12 @@ static ssize_t pending_discard_show(struct f2fs_attr *a, > > &SM_I(sbi)->dcc_info->discard_cmd_cnt)); > > } > > +static ssize_t atgc_enabled_show(struct f2fs_attr *a, > > + struct f2fs_sb_info *sbi, char *buf) > > +{ > > + return sysfs_emit(buf, "%d\n", sbi->am.atgc_enabled ? 1 : 0); > > +} > > + > > static ssize_t gc_mode_show(struct f2fs_attr *a, > > struct f2fs_sb_info *sbi, char *buf) > > { > > @@ -1017,6 +1023,7 @@ F2FS_GENERAL_RO_ATTR(encoding); > > F2FS_GENERAL_RO_ATTR(mounted_time_sec); > > F2FS_GENERAL_RO_ATTR(main_blkaddr); > > F2FS_GENERAL_RO_ATTR(pending_discard); > > +F2FS_GENERAL_RO_ATTR(atgc_enabled); > > F2FS_GENERAL_RO_ATTR(gc_mode); > > #ifdef CONFIG_F2FS_STAT_FS > > F2FS_GENERAL_RO_ATTR(moved_blocks_background); > > @@ -1144,6 +1151,7 @@ static struct attribute *f2fs_attrs[] = { > > ATTR_LIST(atgc_candidate_count), > > ATTR_LIST(atgc_age_weight), > > ATTR_LIST(atgc_age_threshold), > > + ATTR_LIST(atgc_enabled), > > ATTR_LIST(seq_file_ra_mul), > > ATTR_LIST(gc_segment_mode), > > ATTR_LIST(gc_reclaimed_segments),