* zram: zram_free_page calls in zram_meta_free
@ 2023-11-06 20:42 Vasily Averin
2023-11-07 7:23 ` Sergey Senozhatsky
0 siblings, 1 reply; 2+ messages in thread
From: Vasily Averin @ 2023-11-06 20:42 UTC (permalink / raw)
To: Sergey Senozhatsky, Minchan Kim; +Cc: linux-kernel@vger.kernel.org, linux-block
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: zram: zram_free_page calls in zram_meta_free
2023-11-06 20:42 zram: zram_free_page calls in zram_meta_free Vasily Averin
@ 2023-11-07 7:23 ` Sergey Senozhatsky
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2023-11-07 7:23 UTC (permalink / raw)
To: Vasily Averin
Cc: Sergey Senozhatsky, Minchan Kim, linux-kernel@vger.kernel.org,
linux-block
On (23/11/06 23:42), Vasily Averin wrote:
> 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?
It's simply pointless. Reset is performed under write init_lock,
which is an upper level per-device lock.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-07 7:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 20:42 zram: zram_free_page calls in zram_meta_free Vasily Averin
2023-11-07 7:23 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox