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

Peter Zijlstra
2020-05-20T11:07:39Z

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 ?