linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: "linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"naresh.kamboju@linaro.org" <naresh.kamboju@linaro.org>,
	"aleksei.kodanev@bell-sw.com" <aleksei.kodanev@bell-sw.com>
Subject: Re: [PATCH 2/3] selftests/zram01.sh: Fix compression ratio calculation
Date: Wed, 26 Jan 2022 06:08:42 +0000	[thread overview]
Message-ID: <61F0E590.3080101@fujitsu.com> (raw)
In-Reply-To: <f80750cd-d2e8-cc57-37b6-cb4f770c61e2@linuxfoundation.org>

on 2022/1/26 4:37, Shuah Khan wrote:
> On 12/15/21 2:56 AM, Yang Xu wrote:
>> zram01 uses `free -m` to measure zram memory usage. The results are
>> nonsense
>> because they are polluted by all running processes on the system.
>>
>
> Are the results inaccurate or does /sys/block/zram<id>/mm_stat is a quick
> way to get the information?
The "free -m" result is inaccurate because it caculted global systemd 
free memory instead of process that used zram device.

We should use mm_stat as Documentation/admin-guide/blockdev/zram.rst wrote:

File /sys/block/zram<id>/mm_stat

The mm_stat file represents the device's mm statistics. It consists of a 
single
line of text and contains the following stats separated by whitespace:

  ================ 
=============================================================
  orig_data_size   uncompressed size of data stored in this disk.
                   Unit: bytes
  compr_data_size  compressed size of data stored in this disk
  mem_used_total   the amount of memory allocated for this disk. This
                   includes allocator fragmentation and metadata
>
> In any case, this patch and all 3 patches in this series have:
>
> WARNING: Possible unwrapped commit description (prefer a maximum 75
> chars per line)
>
> Please run checkpatch.pl and clean these up.
Ok, Will do it in v2.

Best Regards
Yang Xu
>
> thanks,
> -- Shuah

  reply	other threads:[~2022-01-26  6:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  9:56 [PATCH 1/3] selftests/zram: Remove obsolete max_comp_streams interface Yang Xu
2021-12-15  9:56 ` [PATCH 2/3] selftests/zram01.sh: Fix compression ratio calculation Yang Xu
2022-01-25 20:37   ` Shuah Khan
2022-01-26  6:08     ` xuyang2018.jy [this message]
2021-12-15  9:56 ` [PATCH 3/3] selftests/zram: Adapt the situation that /dev/zram0 is being used Yang Xu
2022-01-25 20:40   ` Shuah Khan
2022-01-13  6:26 ` [PATCH 1/3] selftests/zram: Remove obsolete max_comp_streams interface xuyang2018.jy
2022-01-25 20:52   ` Shuah Khan
2022-01-25 20:33 ` Shuah Khan
2022-01-26  5:19   ` xuyang2018.jy
2022-01-26  7:13     ` Petr Vorel
2022-01-26 17:35       ` Shuah Khan
2022-01-26 18:24         ` Petr Vorel
2022-01-26 18:37           ` Shuah Khan
2022-01-27  9:11         ` [PATCH v2 1/3] selftests/zram: Skip max_comp_streams interface on newer kernel Yang Xu
2022-01-27  9:11           ` [PATCH v2 2/3] selftests/zram01.sh: Fix compression ratio calculation Yang Xu
2022-01-27  9:11           ` [PATCH v2 3/3] selftests/zram: Adapt the situation that /dev/zram0 is being used Yang Xu
2022-01-27 18:05           ` [PATCH v2 1/3] selftests/zram: Skip max_comp_streams interface on newer kernel Shuah Khan
2022-01-28  1:17             ` xuyang2018.jy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61F0E590.3080101@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=aleksei.kodanev@bell-sw.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).