Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp462000ybk; Wed, 20 May 2020 04:11:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxudQK8A2cy3WMn0viGMVHAfJmj8sHU83gNGfsvRyeVUPvK+PjNirRLSzBOI8wJN3FlCGwg X-Received: by 2002:aa7:ca13:: with SMTP id y19mr2835576eds.30.1589973095024; Wed, 20 May 2020 04:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589973095; cv=none; d=google.com; s=arc-20160816; b=XhEZlPwPOGAYHE8GYOV/Qmx2sB4H0B5Kd92ZzpXW4H06h9DK3iY12QGcqVgrwV2+37 KEKVsyID0LqeILLqdWj3LVjFouJPXArLtCR4/zijeMm98ixKl6R5TTNuyzgKVgjVPtlF 9XZ3ifMxDVOavaPK3+l9aVNDsJmKNRWxkdgxC7lDAF0C0QlolgKgtt2ojf8q+3F4gBR5 E6DWWd5zblmuUa4kssmVLrXTc1pPReIuYGvFOTwPrj2YOTpwe1RZ84R3c4j4K9PthDeW LILfg3b6i6YP+O2/UXt5iNxFXLxpQFraAUjt53G/cD53ZeK5+fiiNSuOIQAqKNRfWrvr YRRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lvAACVRQSpsFS/D+XzPZoadnFcUf0P0/Wc/zx7O+Etc=; b=y2DYuzeq1JVW+dLVsFCPz2FysZq6gplFzJisVZQXbORzfP8hYEx5cZdQhXDpk2Xw2q IBrhaNT/SRy5mJ4PiYn3c/QxAi+TMDhHTKP4nHOddtofl9E3FrtxsVcZD3Scr3uUz6pE 9pecMQQ039lG34FNBvE0el8Fvg4ktIOlMts759+7wQ9TKg5glcna8Gryefh125LoZ+Vz qcoN3R/UH65CYdvvWWxaCuTrBZl/TxYmigsPsRZfOu97OSQFuNxuUNo395tRqraqmLNW YXv+Gh7hOPgxlUKs+WcPQ17MxHoPZtNSwVczz59+1FLuxVHJTtbdRr/jFCeGUWqz0iGx 3f5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=hpsNtx8Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si1215908edf.228.2020.05.20.04.11.10; Wed, 20 May 2020 04:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=hpsNtx8Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726688AbgETLHi (ORCPT + 99 others); Wed, 20 May 2020 07:07:38 -0400 Received: from merlin.infradead.org ([205.233.59.134]:55930 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726403AbgETLHh (ORCPT ); Wed, 20 May 2020 07:07:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=lvAACVRQSpsFS/D+XzPZoadnFcUf0P0/Wc/zx7O+Etc=; b=hpsNtx8Ygc1CilTYuUHEsdRWjo pqvXWU9c0dqPu/X81oB+l9IJ/PeRCyk4y5FAEzOPoUU8htcoVdhqWj+VJWMaGeYq3i5hWZo0+9Y5Y LY4N2E3zAFHCcyMjibnoT9N7s0RWeh5uXdwb8VozUH62bVXKewTLL3R8dcCjW8UpBGQNFhtDQUTYi Dwi7BHO7sDg8CUiq38l51040uMcgkXdXpGAtq0ncheTjmWoSEtXUXgLsArIKsSXUIbV5BJcVeNp3M vnu9EcxRv7oek7qU3B90ITocz/iwLHkj9svkOHLUxsES+gW4T21g2DX+aqqKgFKQORUhT2bZUznmE ZP6iaAXw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jbMYy-0006Dv-OW; Wed, 20 May 2020 11:07:04 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 50C92306089; Wed, 20 May 2020 13:07:03 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3817B29D896DA; Wed, 20 May 2020 13:07:03 +0200 (CEST) Date: Wed, 20 May 2020 13:07:03 +0200 From: Peter Zijlstra To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Steven Rostedt , Will Deacon , Thomas Gleixner , "Paul E . McKenney" , Linus Torvalds , Mike Galbraith , Minchan Kim , Nitin Gupta , Sergey Senozhatsky Subject: Re: [PATCH 7/8] zram: Use local lock to protect per-CPU data Message-ID: <20200520110703.GJ317569@hirez.programming.kicks-ass.net> References: <20200519201912.1564477-1-bigeasy@linutronix.de> <20200519201912.1564477-8-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200519201912.1564477-8-bigeasy@linutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ?