Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp52506ybp; Thu, 3 Oct 2019 10:04:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCGGRfxulm+VBBPMB5iIhQpu9N9xgWESEpYC3nkheuDRLee5NS3oBGKFnUShI/RWUCA0Qh X-Received: by 2002:aa7:d9d2:: with SMTP id v18mr10666144eds.177.1570122261580; Thu, 03 Oct 2019 10:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570122261; cv=none; d=google.com; s=arc-20160816; b=huJ7kTYBmItd4pP2YrOovAYB27pR/EYG8iLSVBONil9J4RiFvPopZev0GG4MhcI8y2 yJ+zmZ/fsjUThGo/VfpiZU3rvE1c4yb2uF+77/kmPSi3rHZd5vavH44RIWo/os4Gw4j7 MkLTXFmiRXLHftsUqg7yI48prg+Z6z/hByU1noioizAQ0OyA/HUraHGGxVnr6sYINXIC HVngw9v2/tJ8XZtabMtSMfBVBFhT7IZ9k+Kp3gQytRivBOnDniVIcLmRDXrvkxbc2tyA o8wdmYs8k0dNQs2lyIdVQzRkh89zXEKgQBRoAajBmAEvZc3c9d3quij+60oJz38XunRT 8DMw== 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; bh=P5wXaF5ZltCgXSM34TOegFWPjTBpFPmOgUeBNVihY4w=; b=s4TfzC35w4eGBFue336o14KYLl4dEyUnOXjXOAHdTKAPTkHAOUuquer6A6sLiR0LwJ xS7IhSXtS3XXfa8TK+KKiQ43gjo1htmLcXsdSVDP1igwp+lwRl89BhIpb+5qpEEGIMlr quFXLjRiUiaxrHA0lZ2AD4HGlEBy+fFOm2pVVHvPJtgFq2suZnKgDCWyT5AarmdYCJTR FE7yePaj5sbAxMas/QvXaRzq5TvfGYwzcXC5KY1KuT662P0gwqrF8V0TCkopaOFvZ3PY SUXPQjsGtZRU6o2A0ztB9lv9TyNOEHZldLuVRcl6QpBLDLc9vfRV+Cnf6Vy4xJkznDoQ 2XbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=JKo8Sv2i; 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 w26si1552008ejb.6.2019.10.03.10.03.56; Thu, 03 Oct 2019 10:04:21 -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=JKo8Sv2i; 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 S2404730AbfJCRCT (ORCPT + 99 others); Thu, 3 Oct 2019 13:02:19 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38743 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388566AbfJCRCN (ORCPT ); Thu, 3 Oct 2019 13:02:13 -0400 Received: by mail-lj1-f196.google.com with SMTP id b20so3594882ljj.5 for ; Thu, 03 Oct 2019 10:02:11 -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=P5wXaF5ZltCgXSM34TOegFWPjTBpFPmOgUeBNVihY4w=; b=JKo8Sv2iFH9OWcLRj6EJ0lrBcfCtSlXqHG89kD5Ub09Y0owCLMwh7kGpo40D50FLmA 8m3gZBLSebpsDzFqxjkVhUIsZ/avu9EVjhD2P/PgJ2J9Q889cf+ojytn85UfifR0QFdJ pJM51Bd87EjuNB8rn2bC+8WGyPlYd0s1aUgKU= 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=P5wXaF5ZltCgXSM34TOegFWPjTBpFPmOgUeBNVihY4w=; b=aVznyWCtF3XWRVCiSNEZtrtQZ4hkDM7jtTaopLQlaXJk+LInk1W0TcNs1os4rc2naI IYO/lFFwxD+EXN3pmCHBybvVFeLKGI0GJJ7N+kA2dn6TYWFdWDKzQzOONKrcr6R7XRLt Lee631b4zwDXXaWtfJECTo3JkcQRz8EGb6FlxsTErLVS8klk6CmP43V1FG5z/F6WCv3/ 6vpkYVyFWjUIXs8MdyJj5wcpDtrpNUMxUiJ/i0sgw/LjXXy3KTLWfOiNFTfnP+DoQtoa kKs4gRd+uh/TLW/nsfKfxtVyn8t9cHYDiT6UMiz1I9qslZ4l8n/PExt881bQjMXCsU1D 3G2A== X-Gm-Message-State: APjAAAXSonTHxmQFxUsZX30ntydaZirmPIArAHlJBAlUvBnfVl36F+eO IYBgftcwb7SdnC6KdDqwl4I33xfsL0Y= X-Received: by 2002:a2e:6e0c:: with SMTP id j12mr6574879ljc.55.1570122130967; Thu, 03 Oct 2019 10:02:10 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id m15sm644247ljh.50.2019.10.03.10.02.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Oct 2019 10:02:10 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id y127so2436801lfc.0 for ; Thu, 03 Oct 2019 10:02:10 -0700 (PDT) X-Received: by 2002:a19:2489:: with SMTP id k131mr6216154lfk.52.1570122129934; Thu, 03 Oct 2019 10:02:09 -0700 (PDT) MIME-Version: 1.0 References: <20190930112636.vx2qxo4hdysvxibl@willie-the-truck> <20190930121803.n34i63scet2ec7ll@willie-the-truck> <20191001092823.z4zhlbwvtwnlotwc@willie-the-truck> <20191001170142.x66orounxuln7zs3@willie-the-truck> <20191001175512.GK25745@shell.armlinux.org.uk> <20191001181438.GL25745@shell.armlinux.org.uk> In-Reply-To: From: Linus Torvalds Date: Thu, 3 Oct 2019 10:01:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Masahiro Yamada Cc: Geert Uytterhoeven , Nick Desaulniers , Russell King - ARM Linux admin , Will Deacon , Nicolas Saenz Julienne , Andrew Morton , Ingo Molnar , Borislav Petkov , Miguel Ojeda , linux-arch , LKML , Catalin Marinas , Stefan Wahren , Kees Cook , Arnd Bergmann , clang-built-linux 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 Wed, Oct 2, 2019 at 7:11 PM Masahiro Yamada wrote: > > Macrofying the 'inline' is a horrid mistake that makes incorrect code work. > It would eternally prevent people from writing portable, correct code. > Please do not encourage to hide problems. Honestly, if the alternative to hiding problems is "use a macro", then I'd rather hide the problems and just make "inline" means "inline". If "inline" means "it's just a hint, use macros", then inline is useless. If "inline" means "using this means that there are known compiler bugs, but we don't know where they trigger", then inline is _worse_ than useless. I do not see the big advantage of letting the compiler say "yeah, I'm not going to do that, Dave". And I see a *huge* disadvantage when people are ignoring compiler bugs, and are saying "use a macro". Seriously. Right now we see the obvious compiler bugs that cause build breakages. How many non-obvious compiler bugs do we have? And how sure are you that our code is "correct" after fixing a couple of obvious cases? As to "portable", nobody cares. We're a kernel. We aren't portable, and never were. If this is purely about the fact that x86 is different from other architectures, then let's remove the "compiler can do stupid things" option on x86 too. It was never clear that it was a huge advantage. Linus