Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp102308ybp; Thu, 3 Oct 2019 10:47:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuNrihaWs+j5y6OsgPtgf0LaMCOvfh1C7pSrx7IRDJaOA6ycIVkRyqfsyQUG7wljxBSBPJ X-Received: by 2002:a17:906:3294:: with SMTP id 20mr8751160ejw.19.1570124853850; Thu, 03 Oct 2019 10:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570124853; cv=none; d=google.com; s=arc-20160816; b=Wp9u1g/LqLtRM/sQjl/6OIcAzEjCwWmm2sKa455EpIVYLgNfGLAXsx4+mYHpeRzsPE zHUNmVL09M7DV6zcXlxpA0JG07CiMv1gBuRj1VU6Ujf4ykx1ENeQpXNffHrKfYIS/Ctq qeFOhnz0/2mWGpQ3HAByo0Bo8n7XPHp0ZD7tp4kcMXVklvMKoDWNBYMVD6LJj5ZL4RRm aFbsNDLQFCH6MwaZ7918Q3SNk3jShOxbng9jr7YXdt7BTqQaZnYQecQ+eXoJSd9hsgjg ZUtI/bB6q3VcrpaCLn4GlnwJ3R+2Fonpl4zbnqyjzSUJzsAVi4JVUyd4NS+uECtZqItY VF1A== 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:dkim-filter; bh=LJ8ChLvuFkxOnRaAfzcwPHpVO6iA3brJ5hpU1BX1eNM=; b=yPXJXpBNhNW7vaHm19oNVnoZ/IJX5hqM1nrjv0BUD9zvhksBDVikSk0Y9T5rgHvnto t8O1c43pwvgK4fZNpNAo9jZ1OS8XFk8w50NmPPvLzVtXaZ7xbvWswwUMhdWVt6AIXBez SUC9syjv9zKncyRLBl/iA+sEJnvKZjTIV0YzWtSjbjsvXfVF9skGR3in0n7CGsNTRucj pyHVQyZywDfCII3O4Wy+bdW9Moh5Jf9hHpO2Yez7BPSlc2zFlAA2wwJdaAw5jRQ6OYWz sufxMBfK6nYwxFgbcOlq/KnkwxmsHZ1xfPCjcz8Ce3OMCmaKyW3k6vVCMmmxyqG4cgn7 ok8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=YJoEtvR8; 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 h17si2101722edb.89.2019.10.03.10.47.09; Thu, 03 Oct 2019 10:47:33 -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=@nifty.com header.s=dec2015msa header.b=YJoEtvR8; 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 S1729674AbfJCR17 (ORCPT + 99 others); Thu, 3 Oct 2019 13:27:59 -0400 Received: from condef-03.nifty.com ([202.248.20.68]:31723 "EHLO condef-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729199AbfJCR1z (ORCPT ); Thu, 3 Oct 2019 13:27:55 -0400 Received: from conssluserg-02.nifty.com ([10.126.8.81])by condef-03.nifty.com with ESMTP id x93HOMtO024256; Fri, 4 Oct 2019 02:24:22 +0900 Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) (authenticated) by conssluserg-02.nifty.com with ESMTP id x93HODVW006126; Fri, 4 Oct 2019 02:24:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com x93HODVW006126 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1570123454; bh=LJ8ChLvuFkxOnRaAfzcwPHpVO6iA3brJ5hpU1BX1eNM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YJoEtvR8gerE47Ilqm+9qHWrT5ejo7mmyCPWUxRwjrQvhDoKpmFyNhYPZB4P/3lQn m488NTZCmfDrSSxvZNiBb4vzFF6bfUzr8wWSvzqs6bipD4/fBJJN6aRgVAL+k7ASSn +GsIyXeenTGPRExtiYn25nAM5HOkCRpBUW/qksdN3Mj2p0pGQ5G2gU+aOnUp/Cj4Ux xxFHclgj2gvSgXwDfv4le3HKJm6T7xR6cGQt4SD4Jz7wUIugAB3BPkYNcNyxJ3jTg9 lmGKs4KldhJ3f1ziivjjmo+VDN5TZEfwPFd2BYBKf/OfFUss37s7QKJA6ZjbndzKXI fZIWQl7F8eHkA== X-Nifty-SrcIP: [209.85.222.42] Received: by mail-ua1-f42.google.com with SMTP id u31so1184450uah.0; Thu, 03 Oct 2019 10:24:13 -0700 (PDT) X-Gm-Message-State: APjAAAX39GdNDrAv1m1XPuAjZBhuYpCZNBh0URvJFTXpMAWwUGBeQboo KNtb5DGQHQ8q4Gkv0Cpk9AYJ1vD1aM29Qr5UmXU= X-Received: by 2002:a9f:21f6:: with SMTP id 109mr3156310uac.109.1570123452512; Thu, 03 Oct 2019 10:24:12 -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: Masahiro Yamada Date: Fri, 4 Oct 2019 02:23:36 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Linus Torvalds 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 Fri, Oct 4, 2019 at 2:02 AM Linus Torvalds wrote: > > 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. For clarification, I am not saying "use macros" at all. I just want to annotate __always_inline for the case "2. code that if not inlined is somehow not correct." > 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. Again, not saying "use a macro". > > 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 -- Best Regards Masahiro Yamada