Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp633544imm; Wed, 10 Oct 2018 01:36:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV63WwlDdX5UtPAfM9r3q3ie7i8xnRWndPU2qcT4kJcf5gcnS+jZLrAG/hF0dzbycP24tO1/b X-Received: by 2002:a17:902:c6b:: with SMTP id 98-v6mr32580680pls.233.1539160611729; Wed, 10 Oct 2018 01:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539160611; cv=none; d=google.com; s=arc-20160816; b=QsQfwO5pyj/1bO+sZB/KbonEXHio9QIlqWbZ3wKsAL1xfcA9V/F+S9R2SQq9v995gI +EoC45K4wGLsOkZ4l8uFlD1cvMDOTqYl4tX08kUUQHrSKIBz4+zmC5J0+ZYvOruxj+YA byuZ6NxI6ZZolmMsUm0cCTAD6aueUSMNJBkPL7Sl+/KroaP+Y7fV6S/ZF1hsdFQvUbmz 4cA02VrzYypdrpOV+EVYOGO3ACnECtj59Z0mQYp0bBdz8KDnQ/Zej8p+bLMo0H6aeIlP J839GoDxrSmBEDH/gCAKJ5qP6PYNwfakNF47XVnNFFETZgJrJdds1v6+K/ulZl4UHAj7 7HAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=0ESp1I8bkYwX/ZP7/DFFM00ZdkdeFJBpJscEpNyfvMk=; b=Dwkk28dkeOWdCD9NoISDhr1Lbq1K2MPzMtB6MHE16AQmXKo2RD20nC+2lt7haElIQ6 TGTUvkOr+1pznArE0HZNnFLOsO3p3r+ybBh4H88KfMiqtQUN7jj0yEYEhTFi6hCL6tF9 qYOxa0aiZMQmgKUbWkMZLaRhZDFo+d0K2uVyfy4uWOt2dBTvi/3s65u+yOgat3DFH/vN LR5QraEh5Lb6+pOsr0cLAFrSDUAHYYcNXrqWaYVlaWkmX0Jq7aAdPPPVNJxyLdisc8oN ywC8K+fUj0zsSOrhq4gYgmskyzEH3aCn/8L+ybyD/Y0CBFJa+RKCtW0zgw3fYI//qEdK R1mg== 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 o16-v6si22591950pgj.592.2018.10.10.01.36.36; Wed, 10 Oct 2018 01:36:51 -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 S1727095AbeJJP5F (ORCPT + 99 others); Wed, 10 Oct 2018 11:57:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:43034 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726596AbeJJP5F (ORCPT ); Wed, 10 Oct 2018 11:57:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0B376AFE6; Wed, 10 Oct 2018 08:35:57 +0000 (UTC) Date: Wed, 10 Oct 2018 10:35:54 +0200 (CEST) From: Richard Biener To: Borislav Petkov cc: Segher Boessenkool , Ingo Molnar , Michael Matz , 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 In-Reply-To: <20181010081906.GA5533@zn.tnic> Message-ID: 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> <20181010080324.GV29268@gate.crashing.org> <20181010081906.GA5533@zn.tnic> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Oct 2018, Borislav Petkov wrote: > On Wed, Oct 10, 2018 at 03:03:25AM -0500, Segher Boessenkool wrote: > > 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. > > Thanks for implementing this, much appreciated. If you need people to > test stuff, lemme know. > > > 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. > > My only concern is how we would catch the other extremity where the > inline asm grows too big and we end up inlining it everywhere and thus > getting fat. The 0day bot already builds tinyconfigs but we should be > looking at vmlinux size growth too. Well, it's like always-inline functions, you have to be careful and _not_ put it everywhere... It's also somewhat different to always-inline functions as those lose their special-ness once inlined (the inlined body is properly accounted for size). Richard.