Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11568953rwd; Thu, 22 Jun 2023 15:28:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ZOqVMZ0NvKQVpe7K7Hgvw+TzrbnklnbiOzC7kL91Rhb6S0hjcMp1wKbkQ4QTd2Vom2xey X-Received: by 2002:a05:6a20:2590:b0:119:87f9:3b04 with SMTP id k16-20020a056a20259000b0011987f93b04mr17063539pzd.6.1687472916611; Thu, 22 Jun 2023 15:28:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687472916; cv=none; d=google.com; s=arc-20160816; b=I6I7K0vRnwLORJTxMMOtPf4LHEx+XdgZo5GUKTouiaFr+vgmLrgBn1HzydIvis8O7q aKC4NffWMvC8hxqjdq5IBrHwcAtAJaXCONyYO5rZTdp5ZT06lBcGxvyXVEJSNNkRraR9 wHnDiXkkkkehT8hgJ/CL8ofjNu18/B5dfLHWWCmcMAOulm5HFGr0wuArzXlyWRk7bDBA iMtDCP7lW55tPGC7bWMB1k/tORP2vCMS+P2JEoZvNPc7f8nTMh7ZhZm2Kf2g+bXUewr+ mWkpo7/So9QaiImFDkPnfsSyhGiO4fpQSxWdi4VsWXmBcHvFCOQ/WhESt4VACJ0Ll1LH Y1SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=PKMhtKFgdWfySpTweTXU9j4cru4Ry9zStYx1evxgaA8=; b=YGOfTTaqsDi/neCtxAORVDGFgZhyuuqE7cDHvq+d1FhI1QMtSXl0YJkSfiQGQTbW10 d+e41RKROkFaDglJvvEFNJ/Gx56wY6Z/KYewIYoLcG8LoVCpM89BatpvqTzqWOUwHPrB QScGrhdzOwT51N/lLc2bJkESp0KF4gmAkwC/42Y21UsgMEHpoKYvBtGErr16vQ7xX+1Q YI/BOM1o+1+iD4lCPud1dhfEwxnc45C71NqQxk8ZKtSuyJCB7kaCJm9+fDxfaLZzTDuo NaCjQrvnIxHFzP6PPcyKHCm4uEwG88XuQP2nWFn3I5mRD1D1v3TOxwzEeIPNhhu9imBk OgRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Y87dbw+c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eg18-20020a056a00801200b005a8c65d57a0si1980277pfb.257.2023.06.22.15.28.25; Thu, 22 Jun 2023 15:28:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Y87dbw+c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230062AbjFVVlP (ORCPT + 99 others); Thu, 22 Jun 2023 17:41:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231160AbjFVVlN (ORCPT ); Thu, 22 Jun 2023 17:41:13 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E8531FF1 for ; Thu, 22 Jun 2023 14:41:11 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-62ff0e0c5d7so60335836d6.1 for ; Thu, 22 Jun 2023 14:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687470071; x=1690062071; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PKMhtKFgdWfySpTweTXU9j4cru4Ry9zStYx1evxgaA8=; b=Y87dbw+cg+wTMcIpPAtf85ukrOYybmHletqopcUQkoSrYPCxLkeUlvHLlbETcKGAsq ZNmZck/5BEnT8PesoEeeDhOXhQ48R6+TZ8vVR7DhbrSAUoqxT7zZv5AgWdC4lhSfZakI g+Q1KhqrS0QbfALMKqALAWQJjiM+o+sRmd+v+dBmGGlGwBy1i3uvNkxst1ywqA/cC8kk 0EGRHcCeYrPMwgH7SKkgS+4wrp/CcpVAV3U9eftiJIHmApYlAqUg0VREho4AabQEtA9/ WdSj9HxWNNhpMhGAL8FAVQb/EzlwW61rZjQ7yjeEd4niYKFiUkp4Rayk8LLmVJbH0faV DqjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687470071; x=1690062071; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PKMhtKFgdWfySpTweTXU9j4cru4Ry9zStYx1evxgaA8=; b=bL1mQdxwwcMEPLz0xj8Hh2ZaU5TspMnEv7JWZpbhD72ffqtYZ4Nh95V5dAvNTiEoyY Hp7e2+cr3VRBzQLvHLsltSQec4XgpoEGk9T6xrQOiqoezK3Kx47+OjuNlaxzBjNzYHuy 7q826lIyvyfiQnOq+6NBTmAAdC+LO7nI5VGHm1U8Yk/RE92XyLuFn9g83ypBxGA5gEHK hHNua5sBMSq0PhtSv6BR9j+kqh6TkXarYuaokATc+i6dFh68O1nAqRw1m7uMCW0f+Tnj djdXjJ7XPaQzwJGkfsWZyoQXhT1tfcLucIRV1Da19eF+yH1M0frmbKJeJpfJSfxNH1uR yvrw== X-Gm-Message-State: AC+VfDyiRC2LK8mGIlyS2FeBgvNz/C0qLQSwpZU5fw8Dy8wTaHpfTqip 1LerV347wz8YJzkaXi5YmG6llU6GGeAnmEZ03cJLaisCN6RnR0F0rBo= X-Received: by 2002:a05:6214:2a8b:b0:62d:df48:baf0 with SMTP id jr11-20020a0562142a8b00b0062ddf48baf0mr23221940qvb.61.1687470070594; Thu, 22 Jun 2023 14:41:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Thu, 22 Jun 2023 14:40:59 -0700 Message-ID: Subject: Re: [PATCH v2 0/4] riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION To: Palmer Dabbelt Cc: nathan@kernel.org, bjorn@kernel.org, Conor Dooley , jszhang@kernel.org, llvm@lists.linux.dev, Paul Walmsley , aou@eecs.berkeley.edu, Arnd Bergmann , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 21, 2023 at 12:46=E2=80=AFPM Palmer Dabbelt wrote: > > On Wed, 21 Jun 2023 11:19:31 PDT (-0700), Palmer Dabbelt wrote: > > On Wed, 21 Jun 2023 10:51:15 PDT (-0700), bjorn@kernel.org wrote: > >> Conor Dooley writes: > >> > >> [...] > >> > >>>> So I'm no longer actually sure there's a hang, just something slow. > >>>> That's even more of a grey area, but I think it's sane to call a 1-h= our > >>>> link time a regression -- unless it's expected that this is just ver= y > >>>> slow to link? > >>> > >>> I dunno, if it was only a thing for allyesconfig, then whatever - but > >>> it's gonna significantly increase build times for any large kernels i= f LLD > >>> is this much slower than LD. Regression in my book. > >>> > >>> I'm gonna go and experiment with mixed toolchain builds, I'll report > >>> back.. > >> > >> I took palmer/for-next (1bd2963b2175 ("Merge patch series "riscv: enab= le > >> HAVE_LD_DEAD_CODE_DATA_ELIMINATION"")) for a tuxmake build with llvm-1= 6: > >> > >> | ~/src/tuxmake/run -v --wrapper ccache --target-arch riscv \ > >> | --toolchain=3Dllvm-16 --runtime docker --directory . -k \ > >> | allyesconfig > >> > >> Took forever, but passed after 2.5h. > > > > Thanks. I just re-ran mine 17/trunk LLD under time (rather that just > > checking top sometimes), it's at 1.5h but even that seems quite long. > > > > I guess this is sort of up to the LLVM folks: if it's expected that DCE > > takes a very long time to link then I'm not opposed to allowing it, but > > if this is probably a bug in LLD then it seems best to turn it off unti= l > > we sort things out over there. > > > > I think maybe Nick or Nathan is the best bet to know? > > Looks like it's about 2h for me. I'm going to drop these from my > staging tree in the interest of making progress on other stuff, but if > this is just expected behavior them I'm OK taking them (though that's > too much compute for me to test regularly): > > $ time ../../../../llvm/install/bin/ld.lld -melf64lriscv -z noexecstack -= r -o vmlinux.o --whole-archive vmlinux.a --no-whole-archive --start-group .= /drivers/firmware/efi/libstub/lib.a --end-group > > real 111m50.678s > user 111m18.739s > sys 1m13.147s Ah, I think you meant s/allmodconfig/allyesconfig/ in your initial report. That makes more sense, and I can reproduce. Let me work on a report. > > >> CONFIG_CC_VERSION_TEXT=3D"Debian clang version 16.0.6 (++2023061011330= 7+7cbf1a259152-1~exp1~20230610233402.106)" > >> > >> > >> Bj=C3=B6rn -- Thanks, ~Nick Desaulniers