Re: [PATCH] zram: support asynchronous writeback

From: Richard Chang
Date: Fri Jun 20 2025 - 01:57:05 EST


Hi Sergey,
I copied three linux-6.16-rc2.tar.gz tarball files as the data set.

Test Flow:
- mkfs on the zram device, mount it
- cp tarball files
- do idle writeback
- check bd_stat writes 185072 pages

On Fri, Jun 20, 2025 at 12:15 PM Sergey Senozhatsky
<senozhatsky@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> On (25/06/20 12:09), Richard Chang wrote:
> > Hi Sergey,
> > The main idea is to replace submit_bio_wait() to submit_bio(), remove
> > the one-by-one IO, and rely on the underlying backing device to handle
> > the asynchronous IO requests.
> > From my testing results on Android, the idle writeback speed increased 27%.
> >
> > idle writeback for 185072 4k-pages (~723 MiB)
> > $ echo all > /sys/block/zram0/idle
> > $ time echo idle > /sys/block/zram0/writeback
> >
> > Async writeback:
> > 0m02.49s real 0m00.00s user 0m01.19s system
> > 0m02.32s real 0m00.00s user 0m00.89s system
> > 0m02.35s real 0m00.00s user 0m00.93s system
> > 0m02.29s real 0m00.00s user 0m00.88s system
> >
> > Sync writeback:
> > 0m03.09s real 0m00.00s user 0m01.07s system
> > 0m03.18s real 0m00.00s user 0m01.12s system
> > 0m03.47s real 0m00.00s user 0m01.16s system
> > 0m03.36s real 0m00.00s user 0m01.27s system
>
> Has this been tested on exactly same data sets? page-to-page comparable?
> We decompress before writeback, so if the data had different compression
> ratios, different number of incompressible objects, etc. then the results
> are not directly comparable.