linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nadav Amit <namit@vmware.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	X86 ML <x86@kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Logan Gunthorpe <logang@deltatee.com>
Subject: Re: [PATCH 1/2] Makefile: Fix distcc compilation with x86 macros
Date: Tue, 13 Nov 2018 18:34:39 +0000	[thread overview]
Message-ID: <48577A3F-0F76-4CCA-A959-965344D7259F@vmware.com> (raw)
In-Reply-To: <40E4E1B4-EF5F-43A1-B42C-C4CF6349FC62@vmware.com>

From: Nadav Amit
Sent: November 13, 2018 at 5:55:34 PM GMT
> To: Ingo Molnar <mingo@kernel.org>
> Cc: Ingo Molnar <mingo@redhat.com>, Masahiro Yamada <yamada.masahiro@socionext.com>, Michal Marek <michal.lkml@markovi.net>, Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@alien8.de>, H. Peter Anvin <hpa@zytor.com>, X86 ML <x86@kernel.org>, Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, Logan Gunthorpe <logang@deltatee.com>
> Subject: Re: [PATCH 1/2] Makefile: Fix distcc compilation with x86 macros
> 
> 
> From: Ingo Molnar
> Sent: November 13, 2018 at 11:30:00 AM GMT
>> To: Nadav Amit <namit@vmware.com>
>> Cc: Ingo Molnar <mingo@redhat.com>, Masahiro Yamada <yamada.masahiro@socionext.com>, Michal Marek <michal.lkml@markovi.net>, Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@alien8.de>, H. Peter Anvin <hpa@zytor.com>, x86@kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH 1/2] Makefile: Fix distcc compilation with x86 macros
>> 
>> 
>> 
>> * Nadav Amit <namit@vmware.com> wrote:
>> 
>>> Introducing the use of asm macros in c-code broke distcc, since it only
>>> sends the preprocessed source file. The solution is to break the
>>> compilation into two separate phases of compilation and assembly, and
>>> between the two concatanate the assembly macros and the compiled (yet
>> 
>> s/concatenate
>> 
>>> not assembled) source file. Since this is less efficient, this
>>> compilation mode is only used when make is called with the "DISTCC=y"
>>> parameter.
>>> 
>>> Note that the assembly stage should also be distributed, if distcc is
>>> configured using "CFLAGS=-DENABLE_REMOTE_ASSEMBLE".
>> 
>> It's a bit sad that we regressed distcc performance …
> 
> I don’t know what the actual impact is, but Logan, who reported the bug says
> there is an alternative solution for when distcc-pump is used (which
> presumably would have ~zero performance degradation). distcc is really
> fragile IMHO - it’s enough that it finds what looks like two source files in
> the compiler command arguments for it to fall back to local compilation.
> 
> [ In this regard, the distcc-pump solution would *not* work if distcc is
> built with support for distributed assembly, since it will consider the .s
> file as a second source file. ]
> 
>>> +# If distcc is used, then when an assembly macro files is needed, the
>>> +# compilation stage and the assembly stage need to be separated. Providing
>>> +# "DISTCC=y" option enables the separate compilation and assembly.
>> 
>> Let's fix the various typos:
>> 
>>> +# If distcc is used, and when assembly macro files are needed, the
>>> +# compilation stage and the assembly stage needs to be separated. 
>>> +# Providing the "DISTCC=y" option enables separate compilation and 
>>> +# assembly.
> 
> That’s grammar, not typos ;-)
> 
> Sorry for that - I will fix it an send v2 (as well as the whitespace noise).

Just one question before I send v2, since I have second thoughts. Does it
make sense to require the “DISTCC” make parameter, or should it be set in
the Kconfig? It can be detected automatically, the same way gcc/clang are
detected or manually through a config option.


  reply	other threads:[~2018-11-13 18:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 15:02 [PATCH 0/2] x86: Asm macros fixes Nadav Amit
2018-11-12 15:02 ` [PATCH 1/2] Makefile: Fix distcc compilation with x86 macros Nadav Amit
2018-11-13 11:30   ` Ingo Molnar
2018-11-13 17:55     ` Nadav Amit
2018-11-13 18:34       ` Nadav Amit [this message]
2018-11-14  7:29         ` Logan Gunthorpe
2018-11-14 17:46           ` Nadav Amit
2018-11-15  1:19             ` Logan Gunthorpe
2018-11-15  1:57               ` Nadav Amit
2018-11-15  2:00                 ` Logan Gunthorpe
2018-11-28 23:09                 ` Logan Gunthorpe
2018-11-29  0:38                   ` Nadav Amit
2018-11-29  0:49                     ` Logan Gunthorpe
2018-11-29  1:31                       ` Nadav Amit
2018-11-29 16:43                         ` Logan Gunthorpe
2018-12-01  6:29                           ` Nadav Amit
2018-11-12 15:02 ` [PATCH 2/2] x86: set a dependency on macros.S Nadav Amit
2018-11-13 11:30   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48577A3F-0F76-4CCA-A959-965344D7259F@vmware.com \
    --to=namit@vmware.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=michal.lkml@markovi.net \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).