Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: sashiko-reviews@lists.linux.dev
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Brian Geffon <bgeffon@google.com>,
	 Barry Song <baohua@kernel.org>, Bo Zhang <zhangbo0325@gmail.com>,
	 Minchan Kim <minchan@kernel.org>,
	Richard Chang <richardycc@google.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH v5 12/13] zram: borrow idle decompression streams in exclusive mode
Date: Mon, 19 Oct 2026 13:01:23 +0900	[thread overview]
Message-ID: <atWV7iJpJv0UXXCQ@google.com> (raw)
In-Reply-To: <sashiko-outbox-176604@kernel.org>

On (26/10/19 03:53), sashiko-bot@kernel.org wrote:
[..]
> > +static struct zcomp_dstrm *zcomp_dstrm_excl_tryget(struct zcomp *comp)
> > +{
> > +	struct zcomp_dstrm *zstrm;
> > +	unsigned int cpu;
> > +
> > +	/* Best-effort start CPU hint; migration during the scan is fine */
> > +	for_each_online_cpu_wrap(cpu, raw_smp_processor_id()) {
> > +		zstrm = per_cpu_ptr(comp->dstream, cpu);
> > +		if (zcomp_dstrm_excl_trylock(zstrm))
> > +			return zstrm;
> > +	}
> > +	return NULL;
> > +}
> 
> [Severity: High]
> Does passing raw_smp_processor_id() directly as the start argument to
> for_each_online_cpu_wrap() in zcomp_dstrm_excl_tryget() break the loop
> termination logic when the task migrates during the scan?

I guess you are right.  I'll fixup in v6.


  reply	other threads:[~2026-10-19  4:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18  3:51 [PATCH v5 00/13] zram: redesign zcomp and rework backends Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 01/13] zram: prefix backends printk-s Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 02/13] zram: remove debugfs entry on init failure Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 03/13] zram: zstd: do not allocate empty C/D-dictionaries Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 04/13] zram: lz4hc: pre-initialize dictionary stream in setup_params Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 05/13] zram: lz4: use LZ4_decompress_safe_usingDict() Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 06/13] zram: lz4hc: " Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 07/13] zram: zstd: do not use kvzalloc() for zstd allocations Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 08/13] zram: reset writeback state in zram_reset_device() Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 09/13] zram: split zcomp into separate R/W streams Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 10/13] zram: introduce shared decompression streams Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 11/13] zram: allocate bounce buffer for spanning objects Sergey Senozhatsky
2026-10-18  3:51 ` [PATCH v5 12/13] zram: borrow idle decompression streams in exclusive mode Sergey Senozhatsky
2026-10-19  3:53   ` sashiko-bot
2026-10-19  4:01     ` Sergey Senozhatsky [this message]
2026-10-18  3:51 ` [PATCH v5 13/13] zram: use a singleton compression context for recompression 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=atWV7iJpJv0UXXCQ@google.com \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=bgeffon@google.com \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=richardycc@google.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zhangbo0325@gmail.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