Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2064193ybk; Mon, 11 May 2020 11:03:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi+AbWjjR3V2cFY70nqo6VEV2W7qDKFWqkcavJcdHQUpj/AE3zA6XNMBvT1cnuqmkCQkWv X-Received: by 2002:a17:906:81ce:: with SMTP id e14mr2740312ejx.76.1589220205548; Mon, 11 May 2020 11:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589220205; cv=none; d=google.com; s=arc-20160816; b=Fa0CPnZO17/HIGORXOJa/KRZLZ6EmopxiDc5PRICOHkfHILIj1gWh8uA9VtT/EFkpU xi7rB3uYBh1udWc7RagUz5dJ93ofuEaaN3UbzDa9e73O/H2a475H/87VfnG8bk84vk2S B9S2vX6LsbzUXq8Op+BSGKe9rVeS8ebHb8rHLLmbW8aSQOC7Q0JfiW9ZXucnDV+xJ1h9 W0/gxWihxttKGoK/Wkrloz5L4NBfKRs2dacP3UffKRrqfAT9rzo2wnPZNJ+YVe3U1hP2 R8jWk/5WEkzztYXGVYwXdU87LT/W8QjbFQhnZ0iFqnXnK53OCggxsRAPEwEYXCD9fZG6 LSCg== 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:mime-version :organization:references:in-reply-to:date:cc:to:reply-to:from :subject:message-id; bh=/C9enE55inG9a7Z5reztXWhrPkujwNxdpeC/nRrFqbI=; b=WZQwkb2c3PlZv5QkKJo4dhs1q+LpAs3l96jluq/tU4xSo3LzYlwPl9Qt2ROQQ9Ydwr SXzu/lCx6AyUQ73wlQ1WLXb/IrlTNUawe/htVc37fB/kVByf2Vn6CrrO96H6Ukoa4R9n G7fuiHA1MmZY1L/De7g+8MxstkNzOea8zuEDRjvnthnqJi449tb64E9OMXDzzZj5bsQE z+nbJV4Qhdbt4jQBAhYFO9bMtGo/aWmIuKoLp5avzFyeWt0jbbkAzfRJyH+bjLGmpTne RmJhhSb/OJ4gdZb6JnpTl2Oo2evpjXejvP7iLVDdFZnRoJqkrjfXXtkqL00C2nnliGPA l+Hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 22si6568160ejw.409.2020.05.11.11.03.00; Mon, 11 May 2020 11:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730961AbgEKR67 (ORCPT + 99 others); Mon, 11 May 2020 13:58:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727051AbgEKR67 (ORCPT ); Mon, 11 May 2020 13:58:59 -0400 Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02005C061A0C for ; Mon, 11 May 2020 10:58:59 -0700 (PDT) Received: from fencepost.gnu.org ([2001:470:142:3::e]:42779) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYCha-00008Q-3v; Mon, 11 May 2020 13:58:54 -0400 Received: from pool-98-118-0-140.bstnma.fios.verizon.net ([98.118.0.140]:36660 helo=pdslaptop.home) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jYChZ-0005XH-5Z; Mon, 11 May 2020 13:58:53 -0400 Message-ID: <0ff4860b4202a6ef3bb3b29912d083d471e1cc1d.camel@gnu.org> Subject: Re: I disabled more compiler warnings.. From: Paul Smith Reply-To: psmith@gnu.org To: Linus Torvalds , David Laight Cc: Arnd Bergmann , Masahiro Yamada , Linux Kernel Mailing List Date: Mon, 11 May 2020 13:58:52 -0400 In-Reply-To: References: <8320f29ca61146fc985083621685ac95@AcuMS.aculab.com> Organization: GNU's Not UNIX! Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-05-11 at 10:41 -0700, Linus Torvalds wrote: > On Mon, May 11, 2020 at 12:43 AM David Laight < > David.Laight@aculab.com> wrote: > > > > I've not looked inside gmake, but I fixed nmake so that it > > properly used a single job token pipe for the entire (NetBSD) > > build and then flushed and refilled it with 'abort' tokens > > when any command failed. > > That made the build stop almost immediately. > > The GNU jobserver doesn't have anything like that, afaik. > > I think it always writes a '+' character as a token, so I guess it > could be extended to write something else for the "abort now" > situation (presumably a '-' character). That was exactly my plan. > But at least for external jobserver clients (of which I am not aware > of any, I think we only depend on the internal GNU make behavior), > the documentation states that you should just write back the same > token you read. I wrote this text precisely because I intended to support using other tokens to specify other situations, such as failure :). As a note, the GCC project has a GSoC project approved for this summer, for GCC and/or binutils to participate in the jobserver protocol when they do multithreading in the compiler/linker. I think they are planning on creating a generic "jobserver library" but I'm not mentoring (I don't have the bandwidth for GSoC mentoring). I do hope to stay abreast of their work and perhaps toss in suggestions however. > Paul - the issue is that most of us build the kernel with a "make > -j" (in my case "-j32") and if an error happens during the > make, it can take a _looong_ time for make to react. And if there are > warnings in the build, they can hide the actual error fairly easily). Yes, I believe I have an enhancement in Savannah about this. > I can trivially see how to do it in the jobserver code itself (just > see if the token we get was '-', and if it was, write it back for the > next user and return error), but it's the downstream make code I'm > entirely unfamiliar with. That's necessary, but my thinking is that more could be done. What I was going to do was if we write back an error token then we would also go into a loop trying to read all the tokens off the jobserver and write back error tokens, until we read an error token, then we'd exit (after writing it back obviously). If you don't do that you'll have to go through an entire set of builds after the failure before everyone notices the failure. If every instance of make does this then you can propogate the error to everyone more quickly. My current work on GNU make is fixing the atrocious mess it has with signal handling: don't even look and if you do, remember I inherited this code (yeah, yeah, a long time ago but still... :)). Right now it's not so hard (especially with large -j) to have make instances hanging when ^C is used due to race conditions in the signal handling. As with all single-threaded applications, though, the problem is the difficulty (in a portable way) of handling both signals and wait*(2) reliably... Anyway, this shouldn't be too difficult.