From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Barry Song <baohua@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
akpm@linux-foundation.org, bigeasy@linutronix.de,
hdanton@sina.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, minchan@kernel.org, ryncsn@gmail.com,
yosry.ahmed@linux.dev, surenb@google.com,
Dongdong Zhang <zhangdongdong5@xiaomi.com>,
Suleiman Souhlal <suleiman@google.com>
Subject: Re: [RFC PATCH] zram: avoid preemption with CPU-based compression backends
Date: Wed, 5 Aug 2026 14:21:03 +0900 [thread overview]
Message-ID: <anLGxk3iShEfCB30@google.com> (raw)
In-Reply-To: <CAGsJ_4wQ=mDXuxxTdAZkicN5pJK3SsNTOxHt5oNYrq7CgCVObw@mail.gmail.com>
Hi Barry,
On (26/08/05 17:09), Barry Song wrote:
> > > This report shows that the zram mutex has become the top lock
> > > contributing to UI frame drops, even surpassing mmap_lock, which we
> > > are also addressing in multiple threads. :-)
> >
> > Any chance you can share more details? Are there perhaps RT tasks
> > in the mix, priority inversion, starvations and so on? Can proxy
> > execution address any of those (if it has relevance to the report
> > you are looking at)?
>
> Hi Sergey,
>
> talked with our engineers reporting the issue. i believe it is all
> about priority inversion.
> proxy execution wont resolve it as we have a sleepable zs-malloc
> within the mutex.
> i believe i need v2 to release the mutex before doing the 2nd stage
> zs_malloc with
> direct reclaim.
Well, we cannot just drop the stream mutex and do sleepable zsmalloc
allocation, because this will invalidate compression buffer. So we
then will need to do re-compression. Something that I was really
happy to drop [1].
Is there any we can do apart from making zram and zsmalloc atomic
again? It's hard to believe that this priority inversion hits
only zram and no other locks in the system.
I really really really don't want to return back to atomic
zram/zsmalloc.
Is the report you are talking about some test or is it a real
world scenario?
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/block/zram/zram_drv.c?h=v6.1.180#n1376
next prev parent reply other threads:[~2026-08-05 5:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 0:55 [RFC PATCH] zram: avoid preemption with CPU-based compression backends Barry Song (Xiaomi)
2026-08-05 1:27 ` Sergey Senozhatsky
2026-08-05 1:57 ` Barry Song
2026-08-05 2:09 ` Sergey Senozhatsky
2026-08-05 5:09 ` Barry Song
2026-08-05 5:21 ` Sergey Senozhatsky [this message]
2026-08-05 7:50 ` Barry Song
2026-08-05 8:46 ` Sergey Senozhatsky
2026-08-05 9:01 ` Sergey Senozhatsky
2026-08-05 10:07 ` Barry Song (Xiaomi)
2026-08-05 10:25 ` Sergey Senozhatsky
2026-08-05 10:34 ` Barry Song
2026-08-05 10:37 ` Sergey Senozhatsky
2026-08-05 2:19 ` Bo Zhang
2026-08-05 2:31 ` Barry Song
2026-08-05 7:30 ` 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=anLGxk3iShEfCB30@google.com \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ryncsn@gmail.com \
--cc=suleiman@google.com \
--cc=surenb@google.com \
--cc=yosry.ahmed@linux.dev \
--cc=zhangdongdong5@xiaomi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox