Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1240739imu; Sat, 17 Nov 2018 20:22:19 -0800 (PST) X-Google-Smtp-Source: AJdET5cPtP7y3xH1RxAFt/rKRz5b27bK+xsS5Zns3nDxUw8Lio4LbxmbukU8rdm7MlCwZ+hBZdGA X-Received: by 2002:a17:902:bd4a:: with SMTP id b10mr17406994plx.232.1542514939214; Sat, 17 Nov 2018 20:22:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542514939; cv=none; d=google.com; s=arc-20160816; b=DLd5Cd0J/9Ow41NGadtxazvGqM2UV+hs6QhY3UBej7eKy8mnkMfvRpUJA/ISuBIxrG sSQKlHSTj/Qs0byYO/VtuHB/tqyQXy4jOlC9jpUf5rJvo+ayC7lOmX9KWE/9v0LzVBQ2 TYg3e6E/ITp0xUwesPTVCi/uYR6En/VVKzEutYc8mTZ7qGTaARcc5xt0U/f7eBIItwIm Geg0A8901hZPU2nTAeZbXqCqJ50lIsloAVmIUTOjI/tKakrM+RlNSeOuCIRMfWAEBTDf l5yClUnpYtU55eMfdBL/r7cDxSinOvFLj/oWYFN/mn/p1mHJ2ZE3DD4B1taX/+m858Kk 3jtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=YfUrfFwqFWq6r1Qt+5F0HSltn/cAJb+2J8gNubMOHcE=; b=zlAryoMacthBCyHz/s3bhLVxLZmD8NBEf5qmiNizhDJlL0Jn43QY26jvxHCXv964Yv oz76ugo8rAgIoCoQkMOBCg4/gjbbJVOuwscx2sCk4aNAqDbx87i9Lc6j6jm33Td4glW4 +gy3IA266kv5dXxF+GlRQeWUPe1Xu3/1cs9G0p0F2KHlTH4O88AN8zg+CT2WGXsUOwjw jJYZ42/46eAlxlP+zN56SS7W4aCEp81pQnkqb+6SU1yxRG4xDq1ZWsD9qGem2+f0WwZ/ ZkM5CG9peFLGbnXH36cCrvJ5apLUgC4iEVQELwN+XT/+uuQbK/5b9qCGQclw3NgI0mwh MyZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=vllnvCb1; 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 d9si2079097plr.127.2018.11.17.20.22.04; Sat, 17 Nov 2018 20:22:19 -0800 (PST) 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=vllnvCb1; 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 S1726496AbeKROkW (ORCPT + 99 others); Sun, 18 Nov 2018 09:40:22 -0500 Received: from conssluserg-02.nifty.com ([210.131.2.81]:24940 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbeKROkW (ORCPT ); Sun, 18 Nov 2018 09:40:22 -0500 Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (authenticated) by conssluserg-02.nifty.com with ESMTP id wAI4LGuN016166; Sun, 18 Nov 2018 13:21:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com wAI4LGuN016166 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542514877; bh=YfUrfFwqFWq6r1Qt+5F0HSltn/cAJb+2J8gNubMOHcE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vllnvCb1FqigjGCA7+0wJhv0U90zqu/tQMRW4v/8Yj7afpmngLwgxxInVV3Yye+Hd gJLIDMkCoHY+/axZcCkCHLc7UcqweaKV8KfpSNI/LiHx0Ey+V+cFBDxGNTqYd6THAe ECjdvY5vw20RlpDVHa+ltxOmxkpOcs1ommzSZ8paNJYfw23JaV56j/KHRmF9jYqS84 ZLiC6mrhYdYOxXZXHAsDha9yuVXGIQDxkpm8576aIAyThf3OKqyJ49O+SKGi8P6Vn+ 1fFh36UFh/lU23IPQnDuuxEZyWlBcPXEHH+zjKXotUmfbiqeMJJGWCy9pnzXoJYrBJ W3L7d5emTZ0wg== X-Nifty-SrcIP: [209.85.217.47] Received: by mail-vs1-f47.google.com with SMTP id x64so15963455vsa.5; Sat, 17 Nov 2018 20:21:16 -0800 (PST) X-Gm-Message-State: AGRZ1gLQpiR90YyfZPHIhuDrs2F23veBGouf8YNcnc4ebTImJ8xV390l cD2qLq3vKD5g37F6RP7CvVwg9ZCDcW2pvdJOWCk= X-Received: by 2002:a67:485:: with SMTP id 127mr7411117vse.54.1542514875811; Sat, 17 Nov 2018 20:21:15 -0800 (PST) MIME-Version: 1.0 References: <20181114204309.18645-1-namit@vmware.com> <20181114204309.18645-2-namit@vmware.com> <1C316B94-8F27-439C-B049-9947DC329780@vmware.com> In-Reply-To: <1C316B94-8F27-439C-B049-9947DC329780@vmware.com> From: Masahiro Yamada Date: Sun, 18 Nov 2018 13:20:39 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] Makefile: Fix distcc compilation with x86 macros To: Nadav Amit Cc: Ingo Molnar , Michal Marek , Thomas Gleixner , Borislav Petkov , "H. Peter Anvin" , X86 ML , Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 17, 2018 at 6:02 AM Nadav Amit wrote: > > From: Masahiro Yamada > Sent: November 16, 2018 at 7:45:45 AM GMT > > To: Nadav Amit > > Cc: Ingo Molnar , Michal Marek , Thomas Gleixner , Borislav Petkov , = H. Peter Anvin , X86 ML , Linux Kbuild maili= ng list , Linux Kernel Mailing List > > Subject: Re: [PATCH v2 1/2] Makefile: Fix distcc compilation with x86 m= acros > > > > > > On Thu, Nov 15, 2018 at 1:01 PM Nadav Amit wrote: > >> Introducing the use of asm macros in c-code broke distcc, since it onl= y > >> sends the preprocessed source file. The solution is to break the > >> compilation into two separate phases of compilation and assembly, and > >> between the two concatenate the assembly macros and the compiled (yet > >> not assembled) source file. Since this is less efficient, this > >> compilation mode is only used when distcc or icecc are used. > >> > >> Note that the assembly stage should also be distributed, if distcc is > >> configured using "CFLAGS=3D-DENABLE_REMOTE_ASSEMBLE". > >> > >> Reported-by: Logan Gunthorpe > >> Signed-off-by: Nadav Amit > > > > > > Wow, this is so ugly. > > Indeed, it is not pretty from the Makefile system point of view. > > But it does have merits when it comes to the actual use (by developers). = If > you look on x86, there are a lot of duplicated implementation for C and A= sm > and crazy C macros, for example for PV function call or the alternative > mechanism. The code is also less readable in its current form. > > > I realized how much I hated this by now. > > > > My question is, how long do we need to carry this? > > If it is purely about performance, I am not sure it would make sense to > put it in, as it will indeed be (eventually) solved by the compiler, and > the penalty is not too great. It is unfortunate to mess up the code by having two different ways to achieve the same goal. When GCC with asm inline support is shipped, would you revert 77b0bf55 ? > There is also an advantage for having assembly macros that can override t= he > generated assembly that was generated by the compiler. I think HPA (cc=E2= =80=99d) > looks in this direction (and so do I). > > Regards, > Nadav --=20 Best Regards Masahiro Yamada