From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3478 invoked by alias); 31 Jul 2019 08:21:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 3336 invoked by uid 89); 31 Jul 2019 08:21:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*M:889a X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Jul 2019 08:21:18 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C3E0EAF54; Wed, 31 Jul 2019 08:21:16 +0000 (UTC) Subject: Re: [PATCH] Deduce automatically number of cores for -flto option. To: Jan Hubicka Cc: Jakub Jelinek , Jeff Law , gcc-patches@gcc.gnu.org, Michael Matz , Richard Biener References: <95f20c0a-81a3-2319-326b-3c5baf71e2d1@suse.cz> <20190723092040.czs64os2qymax7sq@kam.mff.cuni.cz> <69d3f527-4086-da6c-e789-469dc389d9eb@redhat.com> <20190730233230.GS15878@tucnak> <87d4b006-bb01-a608-7abe-680dffcc937a@suse.cz> <20190731073407.GU15878@tucnak> <20190731080809.g2uerujjqvsaut74@kam.mff.cuni.cz> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: Date: Wed, 31 Jul 2019 08:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190731080809.g2uerujjqvsaut74@kam.mff.cuni.cz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg01852.txt.bz2 On 7/31/19 10:08 AM, Jan Hubicka wrote: > Hi, > >> We do not detect jobserver because of Dejagnu is not using it. >> And yes, we default to -flto= in LTO tests now. That's >> what is causing issues right now. > > Why the error messages are > make[4]: *** write jobserver: Bad file descriptor. Stop. > make[4]: *** Waiting for unfinished jobs.... > make[4]: *** write jobserver: Bad file descriptor. Stop. > It seems to me that it is internal make from lto-wrapper trying to get > jobserver access? Hard to guess. Can you Jakub debug that? I don't see the error message. > >> Works for me. > > We probably also can give it a meaning controlling the default parameter > of -flto. > I.e. setenv GCC_LTO_PARALLELISM > which we will default to in case only -flto is passed to command line. Interesting idea, I like it, but: - if we detect that jobserver will not work, GCC_LTO_PARALLELISM=jobserver is useless - auto equals now to 'unset GCC_LTO_PARALLELISM' So the only interesting value is numthreads. Then I would recommend to use GCC_LTO_MAX_AUTO_THREADS? > > Make's jobserver is quite nice and easy to use. If it supported named > pipe and there was a small library which allowed to initialize jobserver > and connect to it, perhaps other tools needing parallelism during build > (GCC, ninja, llvm, ...) would be able to use common protocol. Can be a nice GSoC project for next year? Martin > > Honza >