Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp108732pxb; Tue, 9 Mar 2021 17:35:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxV+FNv9csaEFecC3GJf4HHFKCwK2XkMQrp9c8CEmWWVFJXdezuoJa/3JlN6imw9GafhE39 X-Received: by 2002:a05:6402:50ce:: with SMTP id h14mr479216edb.279.1615340156360; Tue, 09 Mar 2021 17:35:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615340156; cv=none; d=google.com; s=arc-20160816; b=TKqj+X1bCRD9hZk5WWPkW98RMhxArDkIkSngky3/uGIcBdWiZKpjiILHTtoL4aW83L nSXg3MamJ2H3VROeVIhftS6lTCu7aaPmZ05Sw851UEEMQ5XZR2OxDmy8k8h7MsvmZdd9 37MLt6Hb8q2D6eTeDtItIs0wRFlRs6vHaSblWyDmtRkKj0wL3izRba9EHDiehMbc2C4t ogzgg6EVJ+nKmNJFs01CZEuqmuF6PqHPv8gXReVYWsT3PVzHDdgEF6ntN9yayFpPKvbz 6apgPf0z8nb4mBW7J/zGuf/QJGVmFNrZBdRQgQEy9WJkKv2Onj4KmRVsXMkl6AMBQXWl 7+Tg== 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; bh=/jieg46/qBsTWIzvz7rFEZ9226hArHhJ5L40Zh+3NNo=; b=xiyezqSWyfEdw5TzsDZ2OaRP/eCY/tTPr5ae7SG+623L+LKgQGw2u28Frt3Ri2b62x ++6eSvUtDfeIe6K96AMqQX2OMHRhbkbKGamzmU6565cTtzF/SpmXX9ZLExjW78goowOd F+73vpJOcCUF4ZFRlusxI0P8lh7LexSN1uIk5za9VKmCQjxYauiLsBGGLFd+T17u+FL9 iNN7TbH4bYfCoRyveZWp2Ui09H/cuIukBkhtRqPY1CPZ6cdgIjBWZTUgXT8Agce8Sl1T 8DrGTB0UDWUcOhsNXfufDZf8+Krga4obtiQBZbm7OBB4ZDV4piMd+AUGwHTrY1EiL6Bg RMnQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si9910337ejx.558.2021.03.09.17.35.34; Tue, 09 Mar 2021 17:35:56 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232146AbhCJBbO (ORCPT + 99 others); Tue, 9 Mar 2021 20:31:14 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:13898 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231422AbhCJBbE (ORCPT ); Tue, 9 Mar 2021 20:31:04 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DwDyR1PCfzkWSn; Wed, 10 Mar 2021 09:29:35 +0800 (CST) Received: from [10.136.110.154] (10.136.110.154) by smtp.huawei.com (10.3.19.208) with Microsoft SMTP Server (TLS) id 14.3.498.0; Wed, 10 Mar 2021 09:31:01 +0800 Subject: Re: [f2fs-dev] [PATCH v2] f2fs: add sysfs nodes to get accumulated compression info To: Daeho Jeong CC: , , , Daeho Jeong References: <20210305022402.2721974-1-daeho43@gmail.com> <2f2abc41-24d5-6795-44fe-b770ed8514df@huawei.com> From: Chao Yu Message-ID: <203c1945-9d48-098e-fa8f-1c86b1086ae3@huawei.com> Date: Wed, 10 Mar 2021 09:31:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.136.110.154] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/3/9 21:00, Daeho Jeong wrote: > 2021년 3월 9일 (화) 오후 6:22, Chao Yu 님이 작성: >> >> On 2021/3/5 10:24, Daeho Jeong wrote: >>> From: Daeho Jeong >>> >>> Added acc_compr_inodes to show accumulated compressed inode count and >>> acc_compr_blocks to show accumulated secured block count with >> >> I noticed that these stat numbers are recorded in extra reserved area in >> hot node curseg journal, the journal will be persisted only for umount >> or fastboot checkpoint, so the numbers are not so accurate... does this >> satisfy your requirement? >> > > Yes, we are satisfied with just getting rough number of them. But, it Alright, > would be better if you suggest more accurate way. :) I think this is the cheapest way to store rough number, otherwise it needs to change f2fs_checkpoint structure layout or add a new inner inode to persist these stat numbers if we want more accurate one. > >>> compression in sysfs. These can be re-initialized to "0" by writing "0" >>> value in one of both. >> >> Why do we allow reset the stat numbers? >> > > Actually, I want to have a way to clear any stale number of them, but > I agree we don't need this. > >> Why not covering all code with macro CONFIG_F2FS_FS_COMPRESSION, since these >> numbers are only be updated when we enable compression. >> > > I wanted to keep the info even in the kernel with doesn't support > per-file compression if those had been written once. What do you > think? Sure, if so it's fine to me. :) Thanks, > >> Thanks, > . >