[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230718115139.GC57770@google.com>
Date: Tue, 18 Jul 2023 20:51:39 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Huanpeng Xin <xinhuanpeng9@...il.com>
Cc: minchan@...nel.org, ngupta@...are.org, axboe@...nel.dk,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
xinhuanpeng <xinhuanpeng@...omi.com>,
Christoph Hellwig <hch@....de>,
Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCH] zram: set zram bio priority to REQ_PRIO.
On (23/07/18 16:49), Sergey Senozhatsky wrote:
> On (23/07/18 15:11), Huanpeng Xin wrote:
> >
> > When the system memory pressure is high, set zram bio priority
> > to REQ_PRIO can quickly swap zarm's memory to backing device,
> > freeing up more space for zram.
This is not how zram writeback works. The only time you can be sure
that writeback frees memory is when you writeback ZRAM_HUGE objects,
because each such object uses a whole physical page on the zsmalloc
side. In any other case, compressed objects share physical pages that
zsmalloc pages consist of, so writeback simply punches wholes in zspages,
without actually freeing any memory immediately. You either need zspages
to becomes empty after writeback or pool compaction, otherwise writeback
does not save any memory, no matter how fast it works.
Powered by blists - more mailing lists