Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1083301pxv; Fri, 9 Jul 2021 17:19:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuHrVKIigzMQxmTsYuCgR7orSHzhPIfaBjykTF/wf4ImNhZ/vEdi5AmmERsgLwNVK0cHEO X-Received: by 2002:a6b:760e:: with SMTP id g14mr30378645iom.119.1625876345349; Fri, 09 Jul 2021 17:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625876345; cv=none; d=google.com; s=arc-20160816; b=XFhiZB2FVYB5r2Q7ywu46aTfUXsT5XFbSujbRgOAYg0oweca9EP+W89GB6HIPDd5OT JGOufYtKiu2wglW6Ik61mwxHPwEI+tBI3HJRt/yzE9cUB0EpQboQdv7Eqeub4ba3M7LN +7EUfRCAMURWRlIVrH5kU6+i45SGGWFMzu8wAFtlH4I9tLD4yJr3d8Il1ItSHg9tkzFh SKiljG9tEPZOCPtI3WGKnbPvCHNNN8PgX2VQJWtExjh8OVx3yy7NXq+StALtHjXMDkWk LxPG+1FyIoWgaYWuMyzwtgD2t8NkXrAi9U5g72YCBIQ7yND0EYS32jNnEhMG/xJdcTLb OY4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=RU6sSrR9edRLXfkZIz/xUHYB6EE4nI16M1q9QSYYnm4=; b=lRdanQKbucVSQ4AxFzhQHMVn0pPwWttHGafvX+1T48kxkhep7RfJiMXmTyUx5kK9n1 U/jiZHT7FUWYshuNfe1PpCUKNmgQSmcCtrr+t2NkptTnPt9UBIy6xTG8wLi6sLAkxTmx zoVxmQrEZGWu9cDrK9CA4x8PkvPg7e9VMoUITb1FdJKOvO1+mHny2hlePZxb+CSqGznA 9Iu5nKwSpZ2umreUV7PZc6P89az9whJ7VUf+5cg8gKahvupJQ9uf7oazLJHSjynUWH0d qtZ21TYkGzVhtVi3nT03FQKZIxPju3Ny2dcxiYq1SYMtOuVnl4IXOYYLfWZQxfFA3GfY ZypQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=offRgoJm; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q23si7977837jav.123.2021.07.09.17.18.51; Fri, 09 Jul 2021 17:19:05 -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=@kernel.org header.s=k20201202 header.b=offRgoJm; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbhGJATt (ORCPT + 99 others); Fri, 9 Jul 2021 20:19:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:42946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbhGJATt (ORCPT ); Fri, 9 Jul 2021 20:19:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B1D3613C5; Sat, 10 Jul 2021 00:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625876225; bh=umyVC+0Nj+PZL1A4xnrSLxFt2AKxxnuQx070lhPlUfg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=offRgoJmSYZARoBqYvSj5qHLOYDJyEPOCCTT+aiYrayNPgvr9p8n9PrnFPNshcf5d LlOk8V1ZGJqFQWVt93y6UKtStQ14DR+cW0xFrXnXK/69iTM0vh9hvxl/QvW/voFBlT HcAfmmSxGxAhbFfBBi21SWOVkRccdA+RwVyC5I6CTbSJbfIcW5FFnkm/Ir+wJA0Uv9 AlVUUetYiAOKaEzcJdd1Mv1ofhTvXjX3oM1fqeSlIJHZMRHEXEl5knw9/utoavCWUf U8F887/Eft4bwc3q1SdoWcsPCPKtifxd38jL1jVhJWDh/pAjAMTiU56vK9P8gMK7rO QIdHsEq0tOssw== Subject: Re: [f2fs-dev] [PATCH v2] f2fs: add sysfs nodes to get GC info for each GC mode To: Daeho Jeong , Daeho Jeong Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com References: <20210709204430.1293298-1-daeho43@gmail.com> From: Chao Yu Message-ID: <4f88fac8-2838-45ac-8f87-789b8b7c2d09@kernel.org> Date: Sat, 10 Jul 2021 08:17:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210709204430.1293298-1-daeho43@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > +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 > + 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,