[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240619175249.lK51lGOx@linutronix.de>
Date: Wed, 19 Jun 2024 19:52:49 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Jens Axboe <axboe@...nel.dk>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Mike Galbraith <umgwanakikbuti@...il.com>,
Minchan Kim <minchan@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] zram: Replace bit spinlocks with spinlock_t for
PREEMPT_RT.
On 2024-06-19 11:34:23 [-0600], Jens Axboe wrote:
> On 6/19/24 9:08 AM, Sebastian Andrzej Siewior wrote:
> > From: Mike Galbraith <umgwanakikbuti@...il.com>
> >
> > The bit spinlock disables preemption. The spinlock_t lock becomes a sleeping
> > lock on PREEMPT_RT and it can not be acquired in this context. In this locked
> > section, zs_free() acquires a zs_pool::lock, and there is access to
> > zram::wb_limit_lock.
> >
> > Use a spinlock_t on PREEMPT_RT for locking and set/ clear ZRAM_LOCK bit after
> > the lock has been acquired/ dropped.
>
> The conditional code depending on CONFIG_PREEMPT_RT is nasty. Why not
> just get rid of that and use the CONFIG_PREEMPT_RT variants for
> everything? They are either good enough to work well in general, or it
> should be redone such that it is.
That would increase the struct size with lockdep for !RT. But it is
probably not a concern. Also other bits (besides ZRAM_LOCK) can not be
added but that wasn't needed in the last few years.
Okay, let me redo it.
Sebastian
Powered by blists - more mailing lists