From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56FD8C43381 for ; Fri, 8 Mar 2019 20:56:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 236AB20855 for ; Fri, 8 Mar 2019 20:56:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XngsJLtp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727148AbfCHU4t (ORCPT ); Fri, 8 Mar 2019 15:56:49 -0500 Received: from merlin.infradead.org ([205.233.59.134]:37196 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbfCHU4t (ORCPT ); Fri, 8 Mar 2019 15:56:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To: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=pRS49PyQ6iProwSA1EgHrfH201whlfaQihWkrf2O/dw=; b=XngsJLtpgBHMfgXROo9pWaU/sp 5yrSifEb3GEmFsk2Agq9LEBL6LLbWRPukYd2Kou0tPwibUbpdAs4sOcfmXUFavNldc6TN330CQ9Bx /Sl0gt/5JJEPyx5qP5zkKib/h42zp6tu/SIb0L+OnE5c8lbXAs7U6ilTOhQBx6vjsLJnLZqgZaiZE /IjnfVBU3pUARCF8SnEySxtP49UkWczWpZ8+ggbxWXAoFvo6fzbScVDWcHHRtcNdGy1Cb+tFJw5mr yzrdjBEliJX+mhjo2aUYUJ2c7xWKeR5kyoAed0XnXPBPLTuHszuV9PcPOxQR2EP1hkqCnV+pgu7e4 jdLVdwAg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2MXp-0001oL-Ci; Fri, 08 Mar 2019 20:56:41 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 8E784981BBE; Fri, 8 Mar 2019 21:56:37 +0100 (CET) Date: Fri, 8 Mar 2019 21:56:37 +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: <20190308205637.GC2482@worktop.programming.kicks-ass.net> References: <20190227101252.413192716@infradead.org> <20190308145031.GY32494@hirez.programming.kicks-ass.net> <64526663-1F10-42A6-A005-92657264D587@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <64526663-1F10-42A6-A005-92657264D587@vmware.com> 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 07:35:17PM +0000, Nadav Amit wrote: > Nice script! I keep asking myself how comparing two binaries can provide > some “number” to indicate how “good” the binary is (at least relatively to > another one) - either during compilation or after. Code size, as you show, > is the wrong metric. Right; I'm still pondering other metrics, like: readelf -WS | grep AX | grep -v -e init -e exit -e altinstr -e unlikely -e fixup which is only 'fast' path text. > Anyhow, I am a little disappointed (and surprised) that in most cases that I > played with, this kind of optimizations have marginal impact on performance > at best, even when the binary changes “a lot” and when microbenchmarks are > used. Right, but if we don't care, it'll be death by 1000 cuts. 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.