Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp673186imm; Wed, 10 Oct 2018 02:23:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV61fepnRZk/YYOlUrT2BNzx6RFUcWkL0gzKX/AkeDlxboT4D+S7iy570W+S3cwiWmbYdZI8A X-Received: by 2002:a63:d84a:: with SMTP id k10-v6mr29409789pgj.314.1539163412386; Wed, 10 Oct 2018 02:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539163412; cv=none; d=google.com; s=arc-20160816; b=FQ0hYsPT7F2+HLJV5Qv/O0bKN6cSUAVa9dtxLxofTpp416cd6gvZtImBRPCoxoEqtM E5b3Ejs2eUdJL4j0VspltUpqayk3uqLxzxdwk3L+dO4W6+hdAhhmejVq28btikwbHezv HPF+AMk58cPogmjexTIxluUFHegaErBVZKTv8V1V8WFbBVhAGkzDe13HMpgivypPnSX8 9Uot+TEba7hUKTlc1rMQPV8larZIoEQ71OBg1rP46QXr+OpT1eTFjwIEqQu8d4pQBwEQ k7flERQsej+Oy9nV6I/fStDtqG76PAVkDboRd8wEPX+VinpR1LnroMDxFiubRdDRd6P/ QOlA== 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; bh=SsJlLqoWKPtcifvt5NQI1R12GHIHaeSFNMYO5iucT+U=; b=y8ALbtIDyc+B3PYx+w1aVu/X1zdupcYbRFq6hsktuaNGC/9VLiPB8uymh2ae68dPO2 TBg5MKYZa3ARF7tZnc68PPvns3XfRXpkHJV3EDAnS65krb4trO4uMwCRLFX9GANYe38E wymHbTe2BJrH2/pNDhPztZuSaVcg4IlMe51W+BDX+YDtwZqekC7czCVjOjUQym9czqM8 cC6INoZFdID84zF1f47ozT9Y2Om1UiXtA05zujKBchqZu+FTUzeq1oAVngh3fucYlczf veZp66TN9NMt4yTjE+g3F3nn1F0u+or+OCaID+r9mUgBoCFsdRfYBXnaT6Wc7WPHMhQL BYqA== ARC-Authentication-Results: i=1; mx.google.com; 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 a5-v6si24406902plh.312.2018.10.10.02.23.17; Wed, 10 Oct 2018 02:23:32 -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; 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 S1726918AbeJJQmq (ORCPT + 99 others); Wed, 10 Oct 2018 12:42:46 -0400 Received: from gate.crashing.org ([63.228.1.57]:33183 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbeJJQmp (ORCPT ); Wed, 10 Oct 2018 12:42:45 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w9A83Vtm025917; Wed, 10 Oct 2018 03:03:32 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id w9A83QM4025857; Wed, 10 Oct 2018 03:03:26 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 10 Oct 2018 03:03:25 -0500 From: Segher Boessenkool To: Ingo Molnar Cc: Richard Biener , Michael Matz , Borislav Petkov , gcc@gcc.gnu.org, Nadav Amit , Ingo Molnar , linux-kernel@vger.kernel.org, x86@kernel.org, Masahiro Yamada , Sam Ravnborg , Alok Kataria , Christopher Li , Greg Kroah-Hartman , "H. Peter Anvin" , Jan Beulich , Josh Poimboeuf , Juergen Gross , Kate Stewart , Kees Cook , linux-sparse@vger.kernel.org, Peter Zijlstra , Philippe Ombredanne , Thomas Gleixner , virtualization@lists.linux-foundation.org, Linus Torvalds , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Andrew Morton Subject: Re: PROPOSAL: Extend inline asm syntax with size spec Message-ID: <20181010080324.GV29268@gate.crashing.org> References: <20181003213100.189959-1-namit@vmware.com> <20181007091805.GA30687@zn.tnic> <20181007132228.GJ29268@gate.crashing.org> <20181008073128.GL29268@gate.crashing.org> <20181009145330.GT29268@gate.crashing.org> <20181010072240.GB103159@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181010072240.GB103159@gmail.com> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 09:22:40AM +0200, Ingo Molnar wrote: > * Richard Biener wrote: > > Can kernel folks give this a second and third thought please so we > > don't implement sth that in the end won't satisfy you guys? > > So this basically passes '0 size' to the inliner, which should be better > than passing in the explicit size, as we'd inevitably get it wrong > in cases. The code immediately after this makes it size 1, even for things like asm(""), I suppose this works better for the inliner. But that's a detail (and it might change); the description says "consider this asm as minimum length and cost for inlining decisions", which works for either 0 or 1. > I also like 'size 0' for the reason that we tend to write assembly code > and mark it 'inline' if we really think it matters to performance, > so making it more likely to be inlined when used within another inline > function is a plus as well. You can think of it as meaning "we want this asm inlined always", and then whether that actually happens depends on if the function around it is inlined or not. Segher