All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasily Averin <vasily.averin@linux.dev>
To: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Minchan Kim <minchan@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-block@vger.kernel.org
Subject: zram: zram_free_page calls in zram_meta_free
Date: Mon, 6 Nov 2023 23:42:31 +0300	[thread overview]
Message-ID: <ebd87e1e-f941-498a-870e-15743ca3fb1f@linux.dev> (raw)

The only place where content of zram entry is accessed and even changed without taken zran lock is
zram_free_page() calls from zram_meta_free().

It does not look like problem because zram should not have any users at this point,
however I still do not understand why this is required?

Is it performance optimization? But zram reset is quite rare operation, I doubt it is called
on some performance-critical fast path. Am I missed something perhaps?

I would like to add proper zram_lock/unlock calls around zram_free_page here,
and would like to clarify,perhaps you have any objections?

Thank you,
	Vasily Averin

             reply	other threads:[~2023-11-06 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06 20:42 Vasily Averin [this message]
2023-11-07  7:23 ` zram: zram_free_page calls in zram_meta_free 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=ebd87e1e-f941-498a-870e-15743ca3fb1f@linux.dev \
    --to=vasily.averin@linux.dev \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --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.