From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Brian Geffon <bgeffon@google.com>,
Richard Chang <richardycc@google.com>,
linux-block@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] zram: do not slot_free() written-back slots
Date: Thu, 19 Mar 2026 10:59:55 -0700 [thread overview]
Message-ID: <abw5m8Q5fFXGIweh@google.com> (raw)
In-Reply-To: <abt1dsjsT9826Ewy@google.com>
On Thu, Mar 19, 2026 at 01:05:55PM +0900, Sergey Senozhatsky wrote:
> As a side note:
>
> On (26/03/19 12:44), Sergey Senozhatsky wrote:
> > - slot_free(zram, index);
> [..]
> > - if (huge)
> > - set_slot_flag(zram, index, ZRAM_HUGE);
>
> Original code had a bug. slot_free() would decrement ->huge_pages,
> then writeback completion would restore the HUGE flag, so when slot
> would get freed for real slot_free() would decrement ->huge_pages
> again, leading to underflow.
This should also go into description of the patch.
next prev parent reply other threads:[~2026-03-19 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 3:44 [PATCH] zram: do not slot_free() written-back slots Sergey Senozhatsky
2026-03-19 4:05 ` Sergey Senozhatsky
2026-03-19 6:47 ` Richard Chang
2026-03-19 7:21 ` Sergey Senozhatsky
2026-03-19 17:59 ` Minchan Kim [this message]
2026-03-19 19:43 ` Minchan Kim
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=abw5m8Q5fFXGIweh@google.com \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bgeffon@google.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=richardycc@google.com \
--cc=senozhatsky@chromium.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.