Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp541971ybt; Wed, 24 Jun 2020 05:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEQCqZAeV0dw5blQLpfKul28pB3BzaIzVMIgf0XOF+Ir6G1GMCa2w4NZnyPNxENQem/xhv X-Received: by 2002:a17:906:3e84:: with SMTP id a4mr23593316ejj.372.1593002180045; Wed, 24 Jun 2020 05:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593002180; cv=none; d=google.com; s=arc-20160816; b=SrDjKjeFldzM1KKgAw0YIGN+ahhw+IeS8bHK10cPq1UwdCwOmkTnKU41bgGCrJB3qX ZxuEbFAf8Z8A0unoC+RoWj5wKBLun/AP5y98nCAMF2MA55TS5X5dRXqnw+mGiJ0MMJdW tgxhIU8pcSJ3SlJgWRUdwCNGJygbVGJafHhAaFqXdJ8nWa3mKPMFOCMgHsfbssjBguhT o2wQHPI/ij2l+gluARYgxtsxscORQtNgGkudsO2Fe3IPjko38MDGwE/jrfORqJBXaTrk YcxLOjipDwkB4loCKGZTcriNleMZBkn7FL5cbe4PNSkDEePADXuaxe6PleFHVDuLF/Wn Me+g== 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=it9VsGosZwW2AP+pfNnE7lbVlyMIxAC0ndaAV7moVK0=; b=K75nQFU7DaXHIfXRMYghuA8U0m7wa/zF3D2EjNiNHCiOT/2/wdoLP4GBwNnw8EiKGX ERSWFIXsF5HEQpcQfx4nZIdEtQSwvMHfuE5oYNdAQfjv6ByEeZ4sgBHozjaCi8A61CaU +UpcXpHqn3+1shLktihPWPX86r6JSwBSCmtHxBt/fGU0BAi4lqZTBo08cXKJEmxO4qYN S5QRG1QJ6+Ib+xtMvQb+5AKm96D7VKIKJfbUjIn5aR3BY3g0g7KiuteqGaxIh/+jtNiJ r10Ad+QJGRxUdpbiCyXcqJvu84sT3rDuAEB2M+vWGsAb+hN8SAsXx46Se6tThAkub4kd KZ0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=PP2H5yDL; 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 y19si12277207edm.387.2020.06.24.05.35.55; Wed, 24 Jun 2020 05:36:20 -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=PP2H5yDL; 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 S2390604AbgFXMce (ORCPT + 99 others); Wed, 24 Jun 2020 08:32:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388181AbgFXMcb (ORCPT ); Wed, 24 Jun 2020 08:32:31 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 829FDC061573; Wed, 24 Jun 2020 05:32:31 -0700 (PDT) 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=it9VsGosZwW2AP+pfNnE7lbVlyMIxAC0ndaAV7moVK0=; b=PP2H5yDL6sw2rzJ9wwDgYU5npx DegwUhHRBC74l2k/7QgLFXzQ5D+rkWEwAvKbR1I5BlI3E3ORsNoJvAslgybSzD5AK5rhJzXFD9sm3 mt64QM+6t3xLhYJDfrIEQpnM0hDmOYoIVcwI8VD8r0PDAcNUZuwgBIVdbWNDkDXIJQOxE1FsInSLv Sf+tHA7qRjaCnJTY/+JKlEIEsbrcHXeyfpbpuBdU/2wzslLrG1aUsGLBJWajvVmeAXZX600RE+BpO OFaoNN3K7C/ocakwoK8OLA1wyT8a/7ZWsuYQfmNbVvXBJzgiVQ1+T+wiZ9xpB65R7HiUVOMsvyoCB Z12SiQnw==; 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 1jo4ZB-000677-UW; Wed, 24 Jun 2020 12:31:50 +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 51910301A7A; Wed, 24 Jun 2020 14:31:47 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3D90821211CCA; Wed, 24 Jun 2020 14:31:47 +0200 (CEST) Date: Wed, 24 Jun 2020 14:31:47 +0200 From: Peter Zijlstra To: Marco Elver Cc: "Ahmed S. Darwish" , Ingo Molnar , Will Deacon , Thomas Gleixner , the arch/x86 maintainers , LKML , Steven Rostedt , bigeasy@linutronix.de, "David S. Miller" , sparclinux@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, heiko.carstens@de.ibm.com, linux-s390@vger.kernel.org, linux@armlinux.org.uk, "Paul E. McKenney" Subject: Re: [PATCH v4 7/8] lockdep: Change hardirq{s_enabled,_context} to per-cpu variables Message-ID: <20200624123147.GH4781@hirez.programming.kicks-ass.net> References: <20200623083721.512673481@infradead.org> <20200623150031.GA2986783@debian-buster-darwi.lab.linutronix.de> <20200623152450.GM4817@hirez.programming.kicks-ass.net> <20200623161320.GA2996373@debian-buster-darwi.lab.linutronix.de> <20200623163730.GA4800@hirez.programming.kicks-ass.net> <20200623175957.GA106514@elver.google.com> <20200623181232.GB4800@hirez.programming.kicks-ass.net> <20200623202404.GE2483@worktop.programming.kicks-ass.net> <20200624090033.GD4800@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 12:17:56PM +0200, Marco Elver wrote: > On Wed, 24 Jun 2020 at 11:01, Peter Zijlstra wrote: > > And I figured a quick way to get rid of that would be something like the > > below, seeing how volatile gets auto annotated... but that doesn't seem > > to actually work. > > > > What am I missing? > > There's one more in include/linux/rcupdate.h. I suggested this at some point: > > https://lore.kernel.org/lkml/20200220213317.GA35033@google.com/ > > To avoid volatiles as I don't think they are needed here. Urgghh.. local_t is very expensive for this. The current code is actually fine, even on load-store architectures. Using local_t will only result in it being more expensive for no gain. I'll go put data_race() around it.