Received: by 10.192.165.148 with SMTP id m20csp5074250imm; Tue, 1 May 2018 08:38:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr/1B04E4kFuGOXwVB5TNhrlsOLYdGwsEzxZBggqMQ56x/7eBfRbmLA2ijdKadz2wAgyNIN X-Received: by 2002:a17:902:1c7:: with SMTP id b65-v6mr16601250plb.298.1525189103472; Tue, 01 May 2018 08:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525189103; cv=none; d=google.com; s=arc-20160816; b=JmgwaC6KqedqluBthl6BAmUbxQX4doYoKRZANP81/nxCslbYw0fKLAVo7JIUYLLe6h D/Hgq44rbETW0kGwEoy1osOdXhMwW6Cqut/aKSEiaQ4ZtjysLx/JyVaPrbfTXocXFlL2 WcmH2BQpd+hhA08hZqoM/gsZXKNJq4BMOfQv0WPZcGz/q4voqx3bUo/YSx/J2C5Lzy+3 SnVtf6fRiwFR+WNDgvnYQnYQyR+p0h9l3DGkYJyjWHuqWz+GGSrgn7EFTqmRURC8ZTXs BC8nucZ9EZW4yXoWlCqKZtzMXHAzXGr4O0dSzoazPNPN84+RzwEfnUlEKd0HwopxxEP3 9pOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=yd/3JZQo12B1olCTRSKlul5RGfqSNLdB1oVCR3G95jQ=; b=cODet2xuxxY5EZ/fIXWOvizK0hyjGs5m6qZ5gohqufP5ihVneetBgD6sq7ao9k3NUg ysC4TAGxMDl9hwpIzobMJec4jw0R0qEJG3aBMNKWk17Lij434V2Ytviupu+VPP3keKxL pIXUyf7ZqqnkmZPBpXoxeJFlwb4gupGcO01GTV1O5/Uo/blXCv6h4giDNFcpUD/kmbxU 1QcoV6Z7+hrKNYC5aa6zYxw3v9qjg1tjgXbZJWS0InUefPibvDBafyXHlsTL8l02Tr/2 ji5KXD4MpmdjxNBcERpbCb9X8PkO0JTnDjYOMqkUF076VCLo33aukudhG5Xw+Cb13bhE /ljQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=eNDocMCv; 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 q3-v6si8102280pgs.516.2018.05.01.08.38.09; Tue, 01 May 2018 08:38:23 -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=pass header.i=@linux-foundation.org header.s=google header.b=eNDocMCv; 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 S1756114AbeEAPhT (ORCPT + 99 others); Tue, 1 May 2018 11:37:19 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:39235 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756032AbeEAPhR (ORCPT ); Tue, 1 May 2018 11:37:17 -0400 Received: by mail-io0-f172.google.com with SMTP id r9-v6so14072936iod.6 for ; Tue, 01 May 2018 08:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yd/3JZQo12B1olCTRSKlul5RGfqSNLdB1oVCR3G95jQ=; b=eNDocMCv2l5OFx//4IIFSvpm1Hy7dzCdkihqejzrfawr3DSWTLWdnB+kLe9v85qzr4 yKwafmZkswc7IWsfivyoXFCYa7Xk6QHZtO9Fs76MkF9tNTkl1SUDycP/P4SnnPyvyNM4 XP0fu9nwQhn1Ex4uTUefQHlU0R2xHKh4sWlkg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yd/3JZQo12B1olCTRSKlul5RGfqSNLdB1oVCR3G95jQ=; b=Wxe4Qci8S7HU2vWFuH0IBdERToeLBX+jAf+ZEfk6iPJCZbkcuVYBzjBG+tM2mv4TFz IPXiOoQ7vBsHnOgr9dDX9R7JKU7zTBrnC/v35x2vRR8W/MggJIfeqUY6z5jnPBjV0/aZ mvi3yLC3wF4PnbLAEvOmo4cFM/fgZaUBaxooOvXsvpH7CwUh9pq0JMh8eHLjqtbU6+OK ahDFGCIN56aVdpInRD59h9VZIinTEBZA3Y6/3ZI+Y/pfvcY7Dxf9uNwpzx83AFL3wFEB WdK1sG2aC/Mg8JS44MYmiuGpCgCWI3sP8euLGHLCd+ybvjYFaEGEtAR/qgh8WE0uzuXn SPCA== X-Gm-Message-State: ALQs6tCPnWveLxClY2iXyKvLr5Ld/LMgfASHrwzD0GNM2GiaGovs54Ik x9fk13hu7DcjyANsD1AOZ+i3HinlWZNzLEhq801EYA== X-Received: by 2002:a6b:a460:: with SMTP id n93-v6mr17672369ioe.238.1525189036538; Tue, 01 May 2018 08:37:16 -0700 (PDT) MIME-Version: 1.0 References: <20180501134020.fonel3x6plea5xdt@treble> In-Reply-To: <20180501134020.fonel3x6plea5xdt@treble> From: Linus Torvalds Date: Tue, 01 May 2018 15:37:06 +0000 Message-ID: Subject: Re: Suboptimal inline heuristics due to non-code sections To: Josh Poimboeuf Cc: namit@vmware.com, Peter Zijlstra , Ingo Molnar , Linux Kernel Mailing List , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 1, 2018 at 6:40 AM Josh Poimboeuf wrote: > But if I remove the section completely by removing the > pushsection/popsection, then copy_overflow() gets inlined. > So GCC's inlining decisions are somehow influenced by the existence of > some random empty section. This definitely seems like a GCC bug to me. I think gcc uses the size of the string to approximate the size of an inline asm. So I don't think it's the "empty section" that makes gcc do this, I think it's literally "our inline asms _look_ big". Linus "does this section directive make me look fat?" Torvalds