Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1793555pxy; Thu, 29 Apr 2021 14:58:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbMz7jsEj3NSHFcRMriCh91L0Ib9dlE9OdFTek9v00TzKcnHskJAlqE3y06llsrNga+Gqp X-Received: by 2002:a17:906:154f:: with SMTP id c15mr696685ejd.142.1619733496654; Thu, 29 Apr 2021 14:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619733496; cv=none; d=google.com; s=arc-20160816; b=rOwIP2picPzcikWlbk/NF7DlPHi0Y/JFyEE6f/GGVLI49KDxX0b671IwXMyz+3NocZ W72l1h3V73V3x7n1Y8xH36JJ+NoJV4zd+QhGZVe1DVL4hMpJL/eipoyr5P8BUMDt/Y0k vHSQNMpl0pKkhQ/Twyuj6J1mBt9ZtHVUfd22ktFF5goQ44nR6WONkLZ0fUpV6ik/WDwI MFiF+82SaJadjv658qDjoORYSyYfTA7BnWhusVJ5AlB2ZTf9EpkFV9818JKVLr7/Y+eu JAnoU3AonnPlO7msSc+655Y/nXeVUBIzOoHjDA6wwJPnqPuLsLgvavNlSeNYe0mYhd+r ofJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=Zbt5Vlv/Alx31b/vvnYikUY4tIX1dxiM5eoc7l+5rps=; b=VTxrjXdeTN8YH/ixpQB8/+AQ+VHH140vlFfcAK+EBiAs9TAvjNRJA1CfvKBRiH9tLg as2xSPZB/nk3xIMWkkxlXSOgg2ZyS8G/nYP78D8hOOjC2hurzEdoQYhCxGZ4rOJBgy4T NdlkeCfCuEYey/TRVaDl0E+8QE267O8LQbbJ/uwsdnQKiL66pzlkSxxDvrXg/hPQL7m5 NYaDzIDTigcO3MFjrf8ew8lxCVjjTt89IMVwlHgbj3QzFxmFbQDGb3lXkW8uLSWmDLkW s8fYRPljMV1N2HpTWGeqmGEGBduuHqpOe7C6yGheIcjVgU9aVKv/OSC9J6wifhhHJMTT h9BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=W+ycA9wZ; 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 q24si3787421eds.147.2021.04.29.14.57.52; Thu, 29 Apr 2021 14:58:16 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=W+ycA9wZ; 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 S235158AbhD2VyR (ORCPT + 99 others); Thu, 29 Apr 2021 17:54:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236978AbhD2VyQ (ORCPT ); Thu, 29 Apr 2021 17:54:16 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3DF8C06138B for ; Thu, 29 Apr 2021 14:53:27 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 12so106790478lfq.13 for ; Thu, 29 Apr 2021 14:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=Zbt5Vlv/Alx31b/vvnYikUY4tIX1dxiM5eoc7l+5rps=; b=W+ycA9wZCo5gKoUz/8ORyQ0pQlfDQ+B/jeB2IVZa3Mkjsnqci1OSTopvwUO7KOfZpC eD9dHANwdb7U1qc55ucBV9mPg3mg95YWANYRnTWqKipG7me92aVnlS6w2M2Qzwuae7fD ktxpC/lk7YlHVrL2n8cPDyIg1aJAjyB2noi/w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Zbt5Vlv/Alx31b/vvnYikUY4tIX1dxiM5eoc7l+5rps=; b=U2J64dT5VmTBJbesI5EQWUzi6fV2RzEeUNRsu8lKUeYzKfL6A85gjb7CvI/70OI6UT 9YxiRIas3ysVogPsNmVtXPiCSOZMHSgcSQM4k8GV8SxOzHPyNiJk9oe7K0G0p7UyBj0v NcSdhXznBD40rVHbyp1vWzGkZ1g4HrWYVmAQAVRPVvf2SIReypNFL9IL/31GJbJ9echg 3lhdwbxD/IUpIAc+fHAjWdX+CJlniMrUqkxZTp5tYXlC3lpG0/6EmbD+kvLJZ7qXnGQx XKiem4dmOt1kjVf5Mu+vxOwQRFUSByjl3IMXa31PR0nU840feHYqFAgemorsV592bsgx 52Sw== X-Gm-Message-State: AOAM531tLO6kmuhD1pGhvxi8231v3f+hOV+CTDX4Njj5BMLl0g+pKuaO cRtwCRnNaMHp8eChgWJla0Iq2ppoeQCin7w7 X-Received: by 2002:ac2:5fcb:: with SMTP id q11mr1128569lfg.248.1619733205872; Thu, 29 Apr 2021 14:53:25 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id p18sm97510lfu.52.2021.04.29.14.53.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Apr 2021 14:53:25 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id x20so76828435lfu.6 for ; Thu, 29 Apr 2021 14:53:24 -0700 (PDT) X-Received: by 2002:ac2:5f97:: with SMTP id r23mr1053760lfe.377.1619733204581; Thu, 29 Apr 2021 14:53:24 -0700 (PDT) MIME-Version: 1.0 From: Linus Torvalds Date: Thu, 29 Apr 2021 14:53:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Very slow clang kernel config .. To: Nick Desaulniers , Masahiro Yamada , Nathan Chancellor Cc: Linux Kernel Mailing List , clang-built-linux Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I haven't looked into why this is so slow with clang, but it really is painfully slow: time make CC=clang allmodconfig real 0m2.667s vs the gcc case: time make CC=gcc allmodconfig real 0m0.903s Yeah, yeah, three seconds may sound like "not a lot of time, but considering that the subsequent full build (which for me is often empty) doesn't take all that much longer, that config time clang waste is actually quite noticeable. I actually don't do allmodconfig builds with clang, but I do my default kernel builds with it: time make oldconfig real 0m2.748s time sh -c "make -j128 > ../makes" real 0m3.546s so that "make oldconfig" really is almost as slow as the whole "confirm build is done" thing. Its' quite noticeable in my workflow. The gcc config isn't super-fast either, but there's a big 3x difference, so the clang case really is doing something extra wrong. I've not actually looked into _why_. Except I do see that "clang" gets invoked with small (empty?) test files several times, probably to check for command line flags being valid. Sending this to relevant parties in the hope that somebody goes "Yeah, that's silly" and fixes it. This is on my F34 machine: clang version 12.0.0 (Fedora 12.0.0-0.3.rc1.fc34) in case it matters (but I don't see why it should). Many many moons ago the promise for clang was faster build speeds. That didn't turn out to be true, but can we please at least try to make them not painfully much slower? Linus