Re: [PATCH 7/8] zram: Use local lock to protect per-CPU data

2020-05-20 Thread Peter Zijlstra
On Tue, May 19, 2020 at 10:19:11PM +0200, Sebastian Andrzej Siewior wrote: > +static DEFINE_LOCAL_LOCK(zcomp_lock); > + > struct zcomp_strm *zcomp_stream_get(struct zcomp *comp) > { > - return *get_cpu_ptr(comp->stream); > + local_lock(zcomp_lock); > + return *this_cpu_ptr(comp->strea

[PATCH 7/8] zram: Use local lock to protect per-CPU data

2020-05-19 Thread Sebastian Andrzej Siewior
From: Mike Galbraith The zcomp driver uses per-CPU compression. The per-CPU data pointer is acquired with get_cpu_ptr() which implicitly disables preemption. It allocates memory inside the preempt disabled region which conflicts with the PREEMPT_RT semantics. Replace the implicit preemption cont