Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9702732rwd; Wed, 21 Jun 2023 10:39:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xfzkiqlZgZ2XNQZu5teTV+KUwBdvQMEXyB5IDL/P2P6XpVplLX005dU/h7b7fTjQygq8N X-Received: by 2002:a05:6a21:339e:b0:121:b590:fb65 with SMTP id yy30-20020a056a21339e00b00121b590fb65mr9565183pzb.11.1687369166161; Wed, 21 Jun 2023 10:39:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687369166; cv=none; d=google.com; s=arc-20160816; b=KAR4ulHXyy+qgOLdjEikHsf486xYTKw62HwXJ4QxqFYWijuXJaEJkLIktL1yLpatKM CDqkIE8bfsZB2WY1YJDmmzo2HOfW6QSUPhzgMx+x1179DSSpn5zgPEyzqisdUiotr2f3 D0reJMxR5pqwjvq2w1nW6AKqV5EDdHkKxaycKcbnJmFSNN7v45cTTAogxVi4Oc/nwtMX PApvwQj0Y2uMD3IckE8h4c3iuyRDY72ikRXodM2EeMHMft2cTuwFEoW7Vo2BlGJyFzGl ODR7k3MSUFLbK+XUl4d2mKmLkKtDjza43RdaR7lW5mwHH8LVWQmcjg5TTQTwfn1/foZa 4iXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YgWJSlNuV9zFuyZpInBI7z65z66Hm4VO42wrZDmKAIE=; b=T8Khji25PAxaPnsSNzotqvlRmoDaTaQKW9BFAIvnSsprl1gFjuQiaWBuPc6bU5ySXt vnX8wBWpDa0PuB60+ViUt5qkdl/hbiZvc3duG2R3yfVrOMsNxiIZv7Px0Js9dDRj/Zse skbkn574tbjgt04tjPQmvxeF/K1fH2OVwM2ADimIuAmu2VjeZzLoef2BuTeftg0fAih8 VIUIDrETNikDjhFIZgEK1FMRiOEsHbGCxJMT9KBdQA3Y/H2v2zkB3cFKyaDtIKID4uCz UWPHSBxCm5R2HkSZZ7n0p6hqfxu9CfiZ+teESbAYdJbEKSMjMnkVRxkMoLXbF8MoEBsp WIBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hcZgCWWz; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020aa793cc000000b0063f2827e1dasi4540856pff.184.2023.06.21.10.39.14; Wed, 21 Jun 2023 10:39:26 -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=@kernel.org header.s=k20201202 header.b=hcZgCWWz; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232422AbjFUQmt (ORCPT + 99 others); Wed, 21 Jun 2023 12:42:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232500AbjFUQmX (ORCPT ); Wed, 21 Jun 2023 12:42:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 318222106; Wed, 21 Jun 2023 09:42:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B8475615F7; Wed, 21 Jun 2023 16:42:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A93CC433C8; Wed, 21 Jun 2023 16:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687365733; bh=FfaBg5slDXiBIl/G9ncJYT509r6SADoRGOfo1kG0lqQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hcZgCWWzRxndVUInZWPJkdsIIhc2UGgGRRIAJVLbhzMzACW7z7Ux+ngAzeLh083h0 XTURDyUDxupRXlw35akMeLi8J5+gSciHqxadUx8PLe/mtED/psnHbQx/TZBZVKAhyo JQXvxyiSHIt0in/JhCF6h0H61lTfCJZjkt3MFanUk9sVfA/uRKkJzeRcSTTOpEhOrG 3M4fSDv7T/8DQlBTvYJ9HIgsS/Vmnu+K2YDpKLrhgIREV3OHApQE3RHRIF+8NEozre DQ1CiDczCl1vCfRUxh2zkXwbfAbHAe6JtlxxLkRfJh9Pwy+Z+IsD2uFnD2MP9YTh5c 5wZ/e+0Z4nvhg== Date: Wed, 21 Jun 2023 17:42:08 +0100 From: Conor Dooley To: Palmer Dabbelt Cc: ndesaulniers@google.com, 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 Subject: Re: [PATCH v2 0/4] riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION Message-ID: <20230621-hungrily-pancake-9e1ff5b0b02a@spud> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qKbzBWp+WnU9QIpu" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --qKbzBWp+WnU9QIpu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 07:53:59AM -0700, Palmer Dabbelt wrote: > On Tue, 20 Jun 2023 17:13:17 PDT (-0700), Palmer Dabbelt wrote: > > On Tue, 20 Jun 2023 14:08:33 PDT (-0700), Palmer Dabbelt wrote: > >> On Tue, 20 Jun 2023 13:47:07 PDT (-0700), ndesaulniers@google.com wrot= e: > >>> On Tue, Jun 20, 2023 at 4:41=E2=80=AFPM Palmer Dabbelt wrote: > >>>> > >>>> On Tue, 20 Jun 2023 13:32:32 PDT (-0700), ndesaulniers@google.com wr= ote: > >>>> > On Tue, Jun 20, 2023 at 4:13=E2=80=AFPM Conor Dooley wrote: > >>>> >> > >>>> >> On Tue, Jun 20, 2023 at 04:05:55PM -0400, Nick Desaulniers wrote: > >>>> >> > On Mon, Jun 19, 2023 at 6:06=E2=80=AFPM Palmer Dabbelt wrote: > >>>> >> > > On Thu, 15 Jun 2023 06:54:33 PDT (-0700), Palmer Dabbelt wrot= e: > >>>> >> > > > On Wed, 14 Jun 2023 09:25:49 PDT (-0700), jszhang@kernel.or= g wrote: > >>>> >> > > >> On Wed, Jun 14, 2023 at 07:49:17AM -0700, Palmer Dabbelt w= rote: > >>>> >> > > >>> On Tue, 23 May 2023 09:54:58 PDT (-0700), jszhang@kernel.= org wrote: > >>>> >> > >>>> >> > > >> Commit 3b90b09af5be ("riscv: Fix orphan section warnings c= aused by > >>>> >> > > >> kernel/pi") touches vmlinux.lds.S, so to make the merge ea= sy, this > >>>> >> > > >> series is based on 6.4-rc2. > >>>> >> > > > > >>>> >> > > > Thanks. > >>>> >> > > > >>>> >> > > Sorry to be so slow here, but I think this is causing LLD to = hang on > >>>> >> > > allmodconfig. I'm still getting to the bottom of it, there's= a few > >>>> >> > > other things I have in flight still. > >>>> >> > > >>>> >> > Confirmed with v3 on mainline (linux-next is pretty red at the = moment). > >>>> >> > https://lore.kernel.org/linux-riscv/20230517082936.37563-1-falc= on@tinylab.org/ > >>>> >> > >>>> >> Just FYI Nick, there's been some concurrent work here from differ= ent > >>>> >> people working on the same thing & the v3 you linked (from Zhangj= in) was > >>>> >> superseded by this v2 (from Jisheng). > >>>> > > >>>> > Ah! I've been testing the deprecated patch set, sorry I just looke= d on > >>>> > lore for "dead code" on riscv-linux and grabbed the first thread, > >>>> > without noticing the difference in authors or new version numbers = for > >>>> > distinct series. ok, nevermind my noise. I'll follow up with the > >>>> > correct patch set, sorry! > >>>> > >>>> Ya, I hadn't even noticed the v3 because I pretty much only look at > >>>> patchwork these days. Like we talked about in IRC, I'm going to go = test > >>>> the merge of this one and see what's up -- I've got it staged at > >>>> , > >>>> though that won't be a stable hash if it's actually broken... > >>> > >>> Ok, https://lore.kernel.org/linux-riscv/20230523165502.2592-1-jszhang= @kernel.org/ > >>> built for me. If you're seeing a hang, please let me know what > >>> version of LLD you're using and I'll build that tag from source to see > >>> if I can reproduce, then bisect if so. > >>> > >>> $ ARCH=3Driscv LLVM=3D1 /usr/bin/time -v make -j128 allmodconfig vmli= nux > >>> ... > >>> Elapsed (wall clock) time (h:mm:ss or m:ss): 2:35.68 > >>> ... > >>> > >>> Tested-by: Nick Desaulniers # build > >> > >> OK, it triggered enough of a rebuild that it might take a bit for > >> anything to filter out. > > > > I'm on LLVM 16.0.2 > > > > $ git describe > > llvmorg-16.0.2 > > $ git log | head -n1 > > commit 18ddebe1a1a9bde349441631365f0472e9693520 > > > > that seems to hang for me -- or at least run for an hour without > > completing, so I assume it's hung. I'm not wed to 16.0.2, it just > > happens to be the last time I bumped the toolchain. I'm moving to > > 16.0.5 to see if that changes anything. >=20 > That also takes at least an hour to link. I tried running on LLVM trunk= =20 > from last night >=20 > $ git log | head -n1 > commit 5e9173c43a9b97c8614e36d6f754317f731e71e9 >=20 > and that completed. Just as a curiosity I tried to re-spin it to see=20 > how long it takes, and it's been running for 23 minutes so far. After some misdirection through stupid user error, I have also reproduced this for an LLVM=3D1 build w/ llvmorg-16.0.0 > So I'm no longer actually sure there's a hang, just something slow. =20 > That's even more of a grey area, but I think it's sane to call a 1-hour= =20 > link time a regression -- unless it's expected that this is just very=20 > 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 if 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.. Cheers, Conor. --qKbzBWp+WnU9QIpu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZJMoYAAKCRB4tDGHoIJi 0mg6AQCXbfOkpJyN5FDZceZ0Lxa6tJ9PIM7gQzEkgSc5Th1vzQD9GZgS8XtOTMpx cUowVAiTXyuNmzDN/wfqsaMeltMiSQA= =1v8b -----END PGP SIGNATURE----- --qKbzBWp+WnU9QIpu--