mbox series

[v2,0/3] zram: Replace bit spinlocks with a spinlock_t.

Message ID 20240620153556.777272-1-bigeasy@linutronix.de (mailing list archive)
Headers show
Series zram: Replace bit spinlocks with a spinlock_t. | expand

Message

Sebastian Andrzej Siewior June 20, 2024, 3:28 p.m. UTC
Hi,

this is follow up to the previous posting, making the lock
unconditionally. The original problem with bit spinlock is that it
disabled preemption and the following operations (within the atomic
section) perform operations that may sleep on PREEMPT_RT. Mike expressed
that he would like to keep using zram on PREEMPT_RT.

v1…v2: https://lore.kernel.org/all/20240619150814.BRAvaziM@linutronix.de/:
  - Add the spinlock_t unconditionally
  - Remove ZRAM_LOCK since it has no user after the lock has been added.
  - Make zram_table_entry::flags an integer so struct zram_table_entry
    does not gain additional weight.

Sebastian

Comments

Sergey Senozhatsky July 4, 2024, 9:39 a.m. UTC | #1
On (24/06/20 17:28), Sebastian Andrzej Siewior wrote:
> this is follow up to the previous posting, making the lock
> unconditionally. The original problem with bit spinlock is that it
> disabled preemption and the following operations (within the atomic
> section) perform operations that may sleep on PREEMPT_RT. Mike expressed
> that he would like to keep using zram on PREEMPT_RT.

Sorry for the delay.

I guess this works for me, FWIW:
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

Minchan, any objections?