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

From: Peter Zijlstra
Date: Wed May 20 2020 - 07:07:39 EST


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->stream);
> }

put it in struct czomp_strm ?