Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1227342pxv; Fri, 9 Jul 2021 22:20:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSzXrsQ3agTqfhwZ+8CVZtQssrSH5oYuKn0tabxfxBkoLwv5vN/XF0YyNEmOduScnRBXsh X-Received: by 2002:a17:906:4816:: with SMTP id w22mr9979042ejq.14.1625894431556; Fri, 09 Jul 2021 22:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625894431; cv=none; d=google.com; s=arc-20160816; b=lIKin4+tbGRRcDO2hXtJfXK8yTSzjMMyRV6lTTNRtzqr9yJ6R5z5D71sPn2k0XXQ3c 3X309uV44yW2OGg5uuSn3THEXv/OlZkgaRss4Zc/06lpbme75/xxkG9j2DtAPBCp0KJH CBWEhwmnJ9ne2WzcsfmdjIvzTq3hrIkHY4Z/LrQE0v8cywFsaUeREELG+D7b+SCUVPRw hJ9uPZ2YRIzAxa9axFiHAWrLO89IW16abko/C8SDZx7Ex/LzpdaG4ZnUenMeKCPy25MY X5NaLIwwf4u6aiQ0EMV3wkUd0rcDmrHQ6L1tuWaeOxPiyk2FZqrGUIawWv9fx//Rsqep e8HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=v4mATH1rAH12LEIYPmoL9CK2Se4W4ULkmGT4gCq/XxE=; b=ZA+3GYYylQHmEIpbHQnOcCn11i5WJVQ8xCO2NGCV4pew8GL9vktHIWXUc71JAhFn4J mMZgws3knG2KIHZrbh6pkA4Nn4Ofu8oS2QyjM0WCgvAnW5Nko3FuwKfqQAKkJHn3iQRE 6yIt+8VGSKYbPLAJN5M2004qEdMZFHIUXsVFRmPjeWSS/h3Nxg9RSkCicLqI9fRS7n2J mXHrXTN1gEtyJ+nXkATrS/4i0e/pAmB/YIIejqKEPVYNZRmW/tcEgDA+fm+/k3WF0iGS jRSJmWZjhv9QQ5KkzGBNZsKq+uyfzdTk4j+isrKXQ6rz6foivPZ4MdN4n/k6OfHFm18h WZ4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EaEdVjTe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si10220089edx.213.2021.07.09.22.20.03; Fri, 09 Jul 2021 22:20:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EaEdVjTe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231253AbhGJFVR (ORCPT + 99 others); Sat, 10 Jul 2021 01:21:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbhGJFVQ (ORCPT ); Sat, 10 Jul 2021 01:21:16 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D3FDC0613DD for ; Fri, 9 Jul 2021 22:18:31 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id t30so11632692ljo.5 for ; Fri, 09 Jul 2021 22:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v4mATH1rAH12LEIYPmoL9CK2Se4W4ULkmGT4gCq/XxE=; b=EaEdVjTewqP2FMVCV+xBPaBTDaAjtdPk7FAEjRMotPxW8/vhdaBacCCFRKRa1s7tMk bO0Hy5Jjnl/m86iHHSrRt1N6uDcSI1JiYuyba+oqQKVudS4ojL18RddFTKzaWCMoZ3O/ e2zOqu0mThC9o9oBoU/Z1/NF2rzs5TvHVK9aol2IDNkbvYsqAXmDwBvu3F5er0diQcKQ k2C1x72XFgLdqUhsdYPUtAKl4rZlilJSNYsOhzkHLSOsCMjWDMIYe2KuzGqve+CeB0sc /FdnlsWkcioStZs16bjFB89Jw2CWWQ2KBd5s8AyZhGd1Uy2wslJe1sFHQg1s4DkrMybT rD1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v4mATH1rAH12LEIYPmoL9CK2Se4W4ULkmGT4gCq/XxE=; b=rRD5MX1K/1f61itf1YR7NJy3pgQhD22MjYZ0PEwfFbQGzdJcBPLsiGLyz1V2tzr6eQ uX0BOMSptSaAUxBv9Yw10YZnIiA+oCwnbImjrbtp96ZdYfo5oci03fe7NysFnmNVk+IH QkCXJEzKwMDqKHq5/se3oDYzZn2lqcfU3JF7pO+5rpvxrjur7e0//kr9LEL1DUaoZkYu 6U0OsV3ysEqTqc3jlAZ91qOvKpKH0nZoBtiBYb4Gc8lORN0J1a6QvUsb66X6syRI3Wol iNFekTJDkPRile9rq6yepl9HUCCEw7Liam0aoThpJNWKyAd0ECqWU/YgWVFIIbxpFQ7K TMRA== X-Gm-Message-State: AOAM530hHuuq7ABcEUKv6zIjUZNJ+HDTa5G/FLUjP0DgR1AmTI4vbwok 0NwrFRQvEKcqCpe3Kpqdx0lOfQfRDMlpUXOTJ3Q= X-Received: by 2002:a2e:5812:: with SMTP id m18mr6295729ljb.327.1625894309549; Fri, 09 Jul 2021 22:18:29 -0700 (PDT) MIME-Version: 1.0 References: <20210709204430.1293298-1-daeho43@gmail.com> <4f88fac8-2838-45ac-8f87-789b8b7c2d09@kernel.org> In-Reply-To: <4f88fac8-2838-45ac-8f87-789b8b7c2d09@kernel.org> From: Daeho Jeong Date: Fri, 9 Jul 2021 22:18:18 -0700 Message-ID: Subject: Re: [f2fs-dev] [PATCH v2] f2fs: add sysfs nodes to get GC info for each GC mode To: Chao Yu Cc: Daeho Jeong , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 9, 2021 at 5:17 PM Chao Yu wrote: > > On 2021/7/10 4:44, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added gc_dirty_segs and gc_dirty_segs_mode sysfs nodes. > > 1) "gc_dirty_segs" shows how many dirty segments have been > > reclaimed by GC during a specific GC mode. > > 2) "gc_dirty_segs_mode" is used to control for which gc mode > > the "gc_dirty_segs" node shows. > > > > Signed-off-by: Daeho Jeong > > --- > > Documentation/ABI/testing/sysfs-fs-f2fs | 14 +++++++++++++ > > fs/f2fs/debug.c | 9 ++++++++ > > fs/f2fs/f2fs.h | 5 +++++ > > fs/f2fs/gc.c | 1 + > > fs/f2fs/sysfs.c | 28 +++++++++++++++++++++++++ > > 5 files changed, 57 insertions(+) > > > > diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs > > index 95155e4ec7fe..0d863eb185f6 100644 > > --- a/Documentation/ABI/testing/sysfs-fs-f2fs > > +++ b/Documentation/ABI/testing/sysfs-fs-f2fs > > @@ -493,3 +493,17 @@ Contact: "Chao Yu" > > 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//gc_dirty_segs > > How about renaming gc_dirty_segs to gc_reclaimed_segments? Makes sense. > > > > +Date: July 2021 > > +Contact: "Daeho Jeong" > > +Description: Show how many dirty segments have been reclaimed by GC during > > + a specific GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy, > > + 3: gc idle AT, 4: GC urgent high, 5: GC urgent low) > > 3. GC idle AT Got it. > > > + You can re-initialize this value to "0". > > + > > +What: /sys/fs/f2fs//gc_dirty_segs_mode > > You know, F2FS_IOC_FLUSH_DEVICE/F2FS_IOC_RESIZE_FS needs to migrate all > blocks of target segment to other place, no matter the segment has partially > or fully valid blocks, so it looks 'gc_segment_mode' will be more appropriate? > > Thanks, Reasonable~ Got it.