Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp284514imc; Sun, 10 Mar 2019 05:48:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVegcy8h/kPckIBVEuXRoPtY3Vq524lLjiAvUsZ8QvgbgRKTZP9GAMxBmt9urZagBVVpuE X-Received: by 2002:a63:6841:: with SMTP id d62mr25725706pgc.133.1552222136919; Sun, 10 Mar 2019 05:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552222136; cv=none; d=google.com; s=arc-20160816; b=yD/2a1OYxyaTZZoTbc+xy+SnOuSgWd7qBJLpMl/2b0tj/sKFQvhZmw+XQgEvVHda/a 1CugBHwVmnGdRSIho3LXpiOE/bIAdK6awx4Kw9Le+yCjHq6dQDLpRT55YTmttBTuV+lp 1LSU2XZxwdAMAWDr3XUntfaDhpprSeFRt54FFzN8dAJBWfnFmAVBPRxsG+YCgnZHpLPf tcSw3YZ+y7eJ5cWZsxeVwdu03uZrt4r9c9s/uu8yymodBxu3M/WwXoCYz2GsJhPhJHlX LuhkRojtoT0UkO/1y3kw9eM8jGbi8FTmXIN0lZr8TbQA9BL5rDe0qUF6t/wBJQAN9uq/ q4sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IYURsCA7wYU7KPGkG0eMg3FFUlv0OL24IBlYWRvSY80=; b=ctHMCmqYOmXDZuVpKFB8NeB7tBQWmaxUi9KDUB/6D0jNwi6fkEJEgwj8+FAUPZBBiC IqszmbZ64QYwV6GXyM0EgGA+JtuZqCWTdsMm1BFkeLMVrydXj/PNy6BR9mvcRbLYvFfm U2OhtGKpm+qXoqC8Hmp5m7mEMq8uUVsEzrH/M0kvhRGgVSHk0Cx+6TGNjJnxLKrA8ylG 3W2RB/GaZ9kY7yOTCgt2fPPAAxGkvOALEh5PYEv9KKrL7draeoedzl1X5ze8fH1XJOUa cxlHbtNsOp172rGCkJQ0aSyyYrVCwecW4JTm0AFcZuhf3cc4vRQOf394qV9jQ4J9Sac3 rFXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ljWOUTfj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si2745599pfl.179.2019.03.10.05.48.06; Sun, 10 Mar 2019 05:48:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ljWOUTfj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726498AbfCJMrH (ORCPT + 99 others); Sun, 10 Mar 2019 08:47:07 -0400 Received: from merlin.infradead.org ([205.233.59.134]:42970 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbfCJMrH (ORCPT ); Sun, 10 Mar 2019 08:47:07 -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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IYURsCA7wYU7KPGkG0eMg3FFUlv0OL24IBlYWRvSY80=; b=ljWOUTfjUyWPg+/2qW6nDZE3e RywceWyEes4pVx64URDPE0Rdd1Mu0vUVhQbeFSPhy4amXha92byt+57j1ksXFcNzOjc0w0zHhhUtb ZBIZZWusAUMeauUNEQiX9PTUXAS/PAmOxoTBuG/KTggDFTUparVVp2eU5JFW9kyT2Gf/1T/KBN3m2 9cwku/ehcVLJ/QeHfRVwrcKZhlMA4yMu2PKwobCcK8LWiYTSpcuSJqz3Iyp+lirYy0Mm+8zV6KXwN kaPGqgdi/wpvYKD7FHRh0ZNiWY+hLRsU2XqR/kjmtHZ5ITrQ+g+UWjabc++JzJo39IFbdDj4r8pG8 Lp5XUUhZw==; Received: from [188.207.104.17] (helo=worktop.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2xqv-0003uw-Lr; Sun, 10 Mar 2019 12:46:53 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 1F202981BBE; Sun, 10 Mar 2019 13:46:50 +0100 (CET) Date: Sun, 10 Mar 2019 13:46:50 +0100 From: Peter Zijlstra To: Nadav Amit Cc: Linus Torvalds , Ingo Molnar , Borislav Petkov , "tglx@linutronix.de" , "luto@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 0/5] x86/percpu semantics and fixes Message-ID: <20190310124650.GA6840@worktop.programming.kicks-ass.net> References: <20190227101252.413192716@infradead.org> <20190308145031.GY32494@hirez.programming.kicks-ass.net> <64526663-1F10-42A6-A005-92657264D587@vmware.com> <20190308205637.GC2482@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190308205637.GC2482@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 08, 2019 at 09:56:37PM +0100, Peter Zijlstra wrote: > Anyway, can anybody explain percpu_stable_op() vs percpu_from_op() ? > > I'm thinking of a variant of Linus' patch, but I'm confused about the > above. So whatever I tried with +m only made things worse and always affects thousands of symbols. Now, afaict the whole percpu_stable_op thing is an ugly hack becaues some earlier compiler would not CSE the regular percpu_from_op. But since it does do that today; esp. after my first patch, I tried implementing this_cpu_read_stable() with percpu_from_op() (no volatile, obv). That also affects _lots_ of sites, but also significantly shrinks the kernel image. It's 2307 symbols affected, but: 17642871 2157438 747808 20548117 1398a15 defconfig-build1/vmlinux.o (patch 1) 17639081 2157438 747808 20544327 1397b47 defconfig-build0/vmlinux.o (patch 1 - percpu_stable_op) So I think I'll add a patch removing percpu_stable_op and all its users.