Thread (20 messages) 20 messages, 5 authors, 2023-08-07

Re: [PATCH 0/1] Possible bug in zram on ppc64le on vfat

From: Petr Vorel <pvorel@suse.cz>
Date: 2022-11-09 22:08:12
Also in: linux-kselftest, lkml, ltp

Hi Sergey, Minchan, all,

On (22/11/07 23:42), Petr Vorel wrote:
[..]
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help