[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3d984bc3-71d0-4ee6-843f-8cc47a90de2b@kernel.dk>
Date: Wed, 19 Jun 2024 12:01:27 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
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 6/19/24 11:52 AM, Sebastian Andrzej Siewior wrote:
> 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.
Yeah I really don't think anyone cares about the struct size when
PROVE_LOCKING is on...
--
Jens Axboe
Powered by blists - more mailing lists