mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>, raoxu <raoxu@uniontech.com>,
	minchan@kernel.org, linux-kernel@vger.kernel.org,
	linux-block@vger.kernel.org, David Hildenbrand <david@kernel.org>
Subject: Re: [PATCH] zram: Avoid duplicate slots in batched writeback
Date: Thu, 12 Nov 2026 23:26:21 -0800	[thread overview]
Message-ID: <20261112232621.6e8916a6e92bbb1afeb1e2a3@linux-foundation.org> (raw)
In-Reply-To: <avK6Y1VmIYIBrorl@google.com>

On Tue, 10 Nov 2026 15:40:13 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:

> On (26/11/10 14:18), raoxu wrote:
> > The writeback interface accepts multiple page_index and page_indexes
> > parameters in one operation. Their ranges can overlap, but
> > scan_slots_for_writeback() only excludes slots that are already being
> > written back or marked as same-filled.
> > 
> > A slot selected by an earlier range is placed on the post-processing list
> > and marked with ZRAM_PP_SLOT. Without checking that flag, an overlapping
> > range can enqueue the same slot again and submit it for writeback more
> > than once.
> > 
> > Skip slots already marked ZRAM_PP_SLOT while holding the slot lock. This
> > keeps each slot in a writeback scan session represented by at most one
> > post-processing entry and leaves the existing release and reuse paths
> > unchanged.
> > 
> > Signed-off-by: Xu Rao <raoxu@uniontech.com>
> 
> LGTM.
> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> 
> Jens, do you want to pick it up and route via block tree or should
> we route via "more traditional" tree (Andrew's tree)?

I grabbed it.

I did recently attempt to pull zram out of the mm project, by moving it
from mm.git's mm-unstable branch and into mm.git's mm-nonmm-unstable
branch.  Because "why does the mm project contain a block device
driver".

I undid that change after about a week - it didn't work out because
zram is joined at the hip with mm/zsmalloc.c.  zsmalloc is also used by
mm/zswap.c.

Oh well.  afaik the zram story has been going smoothly for a long
time(?).


      reply	other threads:[~2026-11-13  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  6:18 raoxu
2026-11-10  6:40 ` Sergey Senozhatsky
2026-11-13  7:26   ` Andrew Morton [this message]

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=20261112232621.6e8916a6e92bbb1afeb1e2a3@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=david@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=raoxu@uniontech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®