Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3609119ybl; Sun, 8 Dec 2019 19:14:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyRgG8aergxu3zRrVW6Kmzk60l+cK+f/gGA9C1bhBGvkU3cCrrhBu8aG8bgl6ejWQ02Uw6i X-Received: by 2002:aca:eb0f:: with SMTP id j15mr21255275oih.6.1575861287884; Sun, 08 Dec 2019 19:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575861287; cv=none; d=google.com; s=arc-20160816; b=A+yEN5NKOlGUpMMh64bC4asal5Jri+jdEmw+/gnqO9boRT60VomnZnVsZ6lZFHOYSO s9cHaeukIwYirKsOf1MQyOlGQ25UTeNTSRbPzLn3dOKJyqXF8+MvdMzbTbrnV12JjU0b GfVcBYRBSqJ0XjCAsuNMNIK7i53pQlF/VXuYqFNqFymNQqBPNpZge3aBvm19RIjTP/oE QzqoSfyJyB3V1iT6VBS8WLqEjP0+9xSxQbIvar8XDlNzs+Mqe2YnM0369ud3pO6o/Iyl qXXfLae0SFKwB6ix5/xigbSApAUXIoiDHYzeWeTCJo8ZUYA8WqaoC9rD/XkOPavyrsNf +3Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1o76pOQdj/SJvElXbPgyCnuWGkFbOPeZu8rPkooahM4=; b=vedGubzLFA5pTt9BGKs1zkuhPWngKcsPyJR5Cyd+boldid0iBipD3cfNQbTeAOJetc WvredNkfAGQB3V3ffZ2gACuu0vfNUyFNRXTdgOGQlckFNuvVvx77YgPMR2ZDpLDYbCoA uI0nRoDBptaAf8lEoaWhOr+2hOc+YAldGwbFolTaVaoxnzj/xlZf1pTtA/E5zL/lU86/ 4FtK3vfmezgOG+fzASmIZG15FLNVE3/EP7AblK5QHOVlxJsOozS6Du20HYlTxsSBauqk X5D55oggBA6srqSNTKDwXSyBk41RspvPLvjzsQ7lMoMeANMJvykXhZbfj2uMLZd08I/X 31Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Vt9S6TSX; 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 s82si10908639oif.96.2019.12.08.19.14.36; Sun, 08 Dec 2019 19:14:47 -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=@linux-foundation.org header.s=google header.b=Vt9S6TSX; 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 S1726926AbfLIDIP (ORCPT + 99 others); Sun, 8 Dec 2019 22:08:15 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45340 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726748AbfLIDIO (ORCPT ); Sun, 8 Dec 2019 22:08:14 -0500 Received: by mail-lf1-f66.google.com with SMTP id 203so9414609lfa.12 for ; Sun, 08 Dec 2019 19:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1o76pOQdj/SJvElXbPgyCnuWGkFbOPeZu8rPkooahM4=; b=Vt9S6TSXx7TfnWCRpkzajAWLUjiKU5QTcoQm7m09hAIRUdfZukovNbeQs1fH/s5mtr VGaN/9k3+pDvP5w1KazB9/nrgR8CHYC/R8p7V8UEOiYzPKpBoA+kXLblbe2CdCwUHZ1M PCyDBCAkovDZOEX6PNO0zvg3/wySvdTYT4iQw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1o76pOQdj/SJvElXbPgyCnuWGkFbOPeZu8rPkooahM4=; b=NKb+usZSKBqeDnwCjD6OGvG6z6BKQ8L8Z2VYA8MgBaywX1eO+DfWO7WOEiCSO2PPEX IWzK5atpT/UQ+2s9A8CrknFOKxcwBQaGLKSk2Yt16VNfKB0I1+A0z2THqZbKsPZ3blEI iFlglKoEzP9ddDG3Xbc/t8dvNOAvE+2pUy8pd10leYOvx3RiJKVkfWak07nvQoBzzvAT UBEKaE8jAoMQ/VwBWyztFihU35Gd1IccCJ1OKtqcPfCbIPnmFzssc1H07WhwOU1RK0uE 8yCbp2YbfKWcau513D7viPPN/pJM5he0gDBoJeUaMlVh3CeKgcHixw+e3IZtUxFOuRj5 kt6Q== X-Gm-Message-State: APjAAAXJSeYN38NzDrUzBUi3tUzUsPNf7r3H4886maFsDDGne/+w79uW M9dNBHXeNMucen6mm7IeBfr9jWbgf38= X-Received: by 2002:a19:f514:: with SMTP id j20mr12828087lfb.31.1575860891181; Sun, 08 Dec 2019 19:08:11 -0800 (PST) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id w17sm7542578lfn.22.2019.12.08.19.08.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Dec 2019 19:08:10 -0800 (PST) Received: by mail-lj1-f181.google.com with SMTP id s22so13856481ljs.7 for ; Sun, 08 Dec 2019 19:08:09 -0800 (PST) X-Received: by 2002:a05:651c:239:: with SMTP id z25mr13013414ljn.48.1575860889477; Sun, 08 Dec 2019 19:08:09 -0800 (PST) MIME-Version: 1.0 References: <157558502272.10278.8718685637610645781.stgit@warthog.procyon.org.uk> <20191206135604.GB2734@twin.jikos.cz> In-Reply-To: From: Linus Torvalds Date: Sun, 8 Dec 2019 19:07:52 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] pipe: Fixes [ver #2] To: Akemi Yagi , Peter Zijlstra , Ingo Molnar Cc: Linux Kernel Mailing List , David Howells Content-Type: multipart/mixed; boundary="00000000000088cb9c05993cb476" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000088cb9c05993cb476 Content-Type: text/plain; charset="UTF-8" On Sun, Dec 8, 2019 at 10:04 AM Linus Torvalds wrote: > > On Sun, Dec 8, 2019 at 8:46 AM Akemi Yagi wrote: > > > > I forgot to mention that the aforementioned bug in make was originally > > reported for Fedora. They now have a patched version of make > > (make-4.2.1-15.fc32) in Rawhide. > > Yes, as mentioned I do expect it's some jobserver interaction - I've > seen bad jobserver behavior before. But my 'make' hasn't been upgraded > since May, as far as I can tell from my logs, so the huge performance > regression was new. Interestingly, when I'm trying to do the non-thundering-herd pipe reads and writes, a side effect of that is that the read target is "fair" (ie when there are multiple concurrent waiting read() calls, it's always the first one that gets it). And that seems to really mess up the jobserver bug, and triggers it every single time. Fairness is often bad for locking throughput, but this is on another level entirely, and yeah, I see a lot of "defunct" shell and make processes, so it does seem to be the make bug. (Adding scheduler people to the participants list, because this patch is the "avoid using the return value of wait_event_interruptible_exclusive()" version because I think wait_event_interruptible_exclusive() is itself buggy). I built a new version of 'make' from source, and that one seems to work fine with the attached patch. But the standard Fedora 'make' binary completely hates this patch. Sad. The patch does seem to be the RightThing(tm) to do, but this make bug makes it inadvisable to apply it unless you want to play with things. Linus --00000000000088cb9c05993cb476 Content-Type: application/x-patch; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k3xufdw20 IGZzL2NvcmVkdW1wLmMgICAgICAgICAgICAgfCAgNCArLS0KIGZzL3BpcGUuYyAgICAg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