From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: caiqingfu <baicaiaichibaicai@gmail.com>
Cc: senozhatsky@chromium.org, akpm@linux-foundation.org,
caiqingfu@ruijie.com.cn, minchan@kernel.org,
mm-commits@vger.kernel.org
Subject: Re: [PATCH] zram: panic when use ext4 over zram
Date: Tue, 10 Dec 2024 18:34:07 +0900 [thread overview]
Message-ID: <20241210093407.GM16709@google.com> (raw)
In-Reply-To: <20241202100753.139305-1-baicaiaichibaicai@gmail.com>
On (24/12/02 18:07), caiqingfu wrote:
> > What's your use-case, what apps you run and what data is stored
> > on zram disk?
>
> The steps to reproduce are as follows:
>
> 1. force slow path,then re-build kernel
>
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 0ca6d55c9917..29ac52a4f2e7 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1683,12 +1683,14 @@ static int zram_write_page(struct zram *zram, struct page *page, u32 index)
> * if we have a 'non-null' handle here then we are coming
> * from the slow path and handle has already been allocated.
> */
> + /*
> if (IS_ERR_VALUE(handle))
> handle = zs_malloc(zram->mem_pool, comp_len,
> __GFP_KSWAPD_RECLAIM |
> __GFP_NOWARN |
> __GFP_HIGHMEM |
> __GFP_MOVABLE);
> + */
> if (IS_ERR_VALUE(handle)) {
> zcomp_stream_put(zram->comps[ZRAM_PRIMARY_COMP]);
> atomic64_inc(&zram->stats.writestall);
>
> 2. create an arm64 virtual machine
>
> qemu-system-aarch64 -M virt -cpu cortex-a57 -smp 4 -m 1024 -kernel kernel-build/arch/arm64/boot/Image \
> -nographic -append "console=ttyAMA0,115200 root=/dev/vda rw" \
> -drive file=$(IMGFILE),format=raw -nic user,hostfwd=tcp::60022-:22
>
> 3. after the virtual machine is started, create zram
>
> cat /sys/class/zram-control/hot_add
> echo 524288000 > /sys/devices/virtual/block/zram0/disksize
> echo 524288000 > /sys/devices/virtual/block/zram1/disksize
> mkfs.ext4 -O ^has_journal -b 4096 -F -L TEMP -m 0 /dev/zram0
> mkdir /tmp/zram
> mount -t ext4 -o errors=continue,nosuid,nodev,noatime /dev/zram0 /tmp/zram
> mkswap /dev/zram1
> swapon /dev/zram1
> echo 100 > /proc/sys/vm/swappiness
> mkdir -p /tmp/zram/stressTest
>
>
> 4. build demo app and run again and again
>
I was more curious whether you have a real-world example/app
that does it.
next prev parent reply other threads:[~2024-12-10 9:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 11:57 [PATCH] zram: panic when use ext4 over zram caiqingfu
2024-11-30 5:32 ` Sergey Senozhatsky
2024-12-02 6:06 ` caiqingfu
2024-12-02 7:04 ` Sergey Senozhatsky
2024-12-02 10:07 ` caiqingfu
2024-12-10 9:34 ` Sergey Senozhatsky [this message]
2024-12-11 11:04 ` Sergey Senozhatsky
2024-12-12 9:55 ` caiqingfu
2024-12-13 4:28 ` Sergey Senozhatsky
2024-12-13 5:56 ` caiqingfu
2024-12-13 6:28 ` Sergey Senozhatsky
2024-12-13 6:40 ` Sergey Senozhatsky
2024-12-15 8:57 ` caiqingfu
2024-12-15 9:12 ` Sergey Senozhatsky
2024-12-16 1:24 ` caiqingfu
2024-12-12 18:40 ` Kees Bakker
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=20241210093407.GM16709@google.com \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=baicaiaichibaicai@gmail.com \
--cc=caiqingfu@ruijie.com.cn \
--cc=minchan@kernel.org \
--cc=mm-commits@vger.kernel.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 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.