All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>,
	ltp@lists.linux.it, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Nitin Gupta <ngupta@vflare.org>, Jens Axboe <axboe@kernel.dk>,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Martin Doucha <mdoucha@suse.cz>,
	Yang Xu <xuyang2018.jy@fujitsu.com>
Subject: Re: [PATCH 0/1] Possible bug in zram on ppc64le on vfat
Date: Wed, 9 Nov 2022 23:08:04 +0100	[thread overview]
Message-ID: <Y2wkxBEnbP9jM0h3@pevik> (raw)
In-Reply-To: <Y2mrRxHhVi/QEiUf@google.com>

Hi Sergey, Minchan, all,


> On (22/11/07 23:42), Petr Vorel wrote:
> [..]
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TBROK: "loop_read_mem_used_total /sys/block/zram1/mm_stat" timed out

> Looking at mm_stat_show(), mem_used can be 0 when mm_stat_show() is
> called on un-initialized device

> ---
> ...
>         u64 orig_size, mem_used = 0;
>         long max_used;
>         ssize_t ret;

>         memset(&pool_stats, 0x00, sizeof(struct zs_pool_stats));

>         down_read(&zram->init_lock);
>         if (init_done(zram)) {
>                 mem_used = zs_get_total_pages(zram->mem_pool);
>                 zs_pool_stats(zram->mem_pool, &pool_stats);
>         }
> ...
> ---

> Can you check if init_done() returns true in your tests?

I'm sorry, it took me some time to find machine where I'd be compile kernel.
Yes, init_done() returns non-zero (1), code goes into if clause and sets
mem_used. I'll check also for mem_used value.

Kind regards,
Petr

WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Minchan Kim <minchan@kernel.org>,
	ltp@lists.linux.it, linux-kselftest@vger.kernel.org,
	Nitin Gupta <ngupta@vflare.org>
Subject: Re: [LTP] [PATCH 0/1] Possible bug in zram on ppc64le on vfat
Date: Wed, 9 Nov 2022 23:08:04 +0100	[thread overview]
Message-ID: <Y2wkxBEnbP9jM0h3@pevik> (raw)
In-Reply-To: <Y2mrRxHhVi/QEiUf@google.com>

Hi Sergey, Minchan, all,


> On (22/11/07 23:42), Petr Vorel wrote:
> [..]
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TINFO: /sys/block/zram1/mm_stat
> > 15859712        0        0 26214400   196608      242        0
> > zram01 7 TBROK: "loop_read_mem_used_total /sys/block/zram1/mm_stat" timed out

> Looking at mm_stat_show(), mem_used can be 0 when mm_stat_show() is
> called on un-initialized device

> ---
> ...
>         u64 orig_size, mem_used = 0;
>         long max_used;
>         ssize_t ret;

>         memset(&pool_stats, 0x00, sizeof(struct zs_pool_stats));

>         down_read(&zram->init_lock);
>         if (init_done(zram)) {
>                 mem_used = zs_get_total_pages(zram->mem_pool);
>                 zs_pool_stats(zram->mem_pool, &pool_stats);
>         }
> ...
> ---

> Can you check if init_done() returns true in your tests?

I'm sorry, it took me some time to find machine where I'd be compile kernel.
Yes, init_done() returns non-zero (1), code goes into if clause and sets
mem_used. I'll check also for mem_used value.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-11-09 22:08 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 19:11 [PATCH 0/1] Possible bug in zram on ppc64le on vfat Petr Vorel
2022-11-07 19:11 ` [LTP] " Petr Vorel
2022-11-07 19:11 ` [PATCH 1/1] zram01.sh: Workaround division by 0 on vfat on ppc64le Petr Vorel
2022-11-07 19:11   ` [LTP] " Petr Vorel
2022-11-21  7:14   ` Li Wang
2022-11-21  8:59     ` Petr Vorel
2022-11-21  8:59       ` Petr Vorel
2023-09-18  9:38       ` Richard Palethorpe
2022-11-07 21:25 ` [PATCH 0/1] Possible bug in zram on ppc64le on vfat Minchan Kim
2022-11-07 21:25   ` [LTP] " Minchan Kim
2022-11-07 21:47   ` Petr Vorel
2022-11-07 21:47     ` [LTP] " Petr Vorel
2022-11-07 22:42     ` Petr Vorel
2022-11-07 22:42       ` [LTP] " Petr Vorel
2022-11-08  1:05       ` Sergey Senozhatsky
2022-11-08  1:05         ` [LTP] " Sergey Senozhatsky
2022-11-09 22:08         ` Petr Vorel [this message]
2022-11-09 22:08           ` Petr Vorel
2022-11-10 23:04     ` Minchan Kim
2022-11-10 23:04       ` [LTP] " Minchan Kim
2022-11-11  9:29       ` Petr Vorel
2022-11-11  9:29         ` [LTP] " Petr Vorel
2022-11-10 14:29   ` Martin Doucha
2022-11-10 14:29     ` [LTP] " Martin Doucha
2022-11-11  0:48     ` Sergey Senozhatsky
2022-11-11  0:48       ` [LTP] " Sergey Senozhatsky
2022-11-21  9:41       ` Petr Vorel
2022-11-21  9:41         ` [LTP] " Petr Vorel
2022-11-22 14:56       ` Martin Doucha
2022-11-22 14:56         ` Martin Doucha
2022-11-22 15:07         ` Petr Vorel
2022-11-22 15:07           ` [LTP] " Petr Vorel
2022-11-29  4:38           ` Sergey Senozhatsky
2022-11-29  4:38             ` [LTP] " Sergey Senozhatsky
2023-05-02 15:23             ` Martin Doucha
2023-05-02 15:23               ` [LTP] " Martin Doucha
2022-11-11  9:18     ` Petr Vorel
2022-11-11  9:18       ` [LTP] " Petr Vorel
2023-08-04  6:37   ` Ian Wienand
2023-08-04  6:37     ` Ian Wienand
2023-08-07  4:44     ` Ian Wienand
2023-08-07  4:44       ` [LTP] " Ian Wienand
2023-08-07  5:19       ` Sergey Senozhatsky
2023-08-07  5:19         ` [LTP] " Sergey Senozhatsky

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=Y2wkxBEnbP9jM0h3@pevik \
    --to=pvorel@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=senozhatsky@chromium.org \
    --cc=xuyang2018.jy@fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.