Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15252185rwd; Sun, 25 Jun 2023 13:31:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5d9CFJK1U05FXMfN8in8QlrF36CId9IDe/VMnWVjMTElxSl5kR3e4Yhjf6mxzYFAjnUCCV X-Received: by 2002:a17:907:75fa:b0:98e:1a0c:12c0 with SMTP id jz26-20020a17090775fa00b0098e1a0c12c0mr2431879ejc.7.1687725088227; Sun, 25 Jun 2023 13:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687725088; cv=none; d=google.com; s=arc-20160816; b=gqeK4SJVBSB8xqNny0q4ZREb6JtHw+aj5+wcUPRjTQ/qEZjpyRF0Ny1g3VNILEAVzb ffGWF5FpBVn/GaJ1uwUl6Ew5TvdRFEVBSur0/UvR6nGmfoGqTL+qWvB50q8OevML9Q5c yXOTtAC96Zgcsat6+DJJ26jRQh+ypfWNNIBpERIO4Xzqx222a2Ne5XXeau6fwqBSISdN 2tHGOfxvxPQ6pqR4EyGHby5HU+IzQrFMRLpVRAYmV/Be0q4f3ddVgXNFeSnfXxa5ThNt xkzgFNgmiyVZXuhPWJgORkASWU58RQBpq4TBWrPT77GLOvIwKN1+VLCM6L9e9Qq4hER+ LtbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=6SoUflbTM/FpgEV6FO9AKFH9tH6vucslhbHlIS2yfeM=; fh=RpUALpCs9dsFwjprz25frTsnvy7vjmVHwLv3t3VSP/U=; b=jibGGYeKvmcV/5YruCyAexqAEm0XKt+5NJJcznfdP2A2tapD+vUqQdzUoCVqLkvk85 o+l9pNfgPE8pnQlxNxRun4JaMyk7d8LbtBjrRxPiNGesYkpY/+ew1S40vBT6n/f+scbB Lxxiadrhh6J4An6mry3IU1ARuBYryK4u68IPm0ljFgC1Q4Im1w33cJd6F1bzPwLDTlVn AozKaGHOg/kKK85O0gnNv/IOnqJrvTTe2sh04JVEifSuhdtlX/3P0AeLnK7Z2nQLD6nb JsGytWz6mSwpAGku6PTpFGPxqd7zY2U69QPtLXHjbXC//s3tzGZxt5ZunsMFwFtRgYXi E+wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=HEBsbjGG; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lz23-20020a170906fb1700b00982a3765df4si2165428ejb.214.2023.06.25.13.31.03; Sun, 25 Jun 2023 13:31:28 -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=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=HEBsbjGG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbjFYUGJ (ORCPT + 99 others); Sun, 25 Jun 2023 16:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjFYUGI (ORCPT ); Sun, 25 Jun 2023 16:06:08 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 255761AD for ; Sun, 25 Jun 2023 13:06:02 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-668704a5b5bso2443765b3a.0 for ; Sun, 25 Jun 2023 13:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1687723561; x=1690315561; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=6SoUflbTM/FpgEV6FO9AKFH9tH6vucslhbHlIS2yfeM=; b=HEBsbjGGx1kZCdDVvczFGgbEwibjlGcvAqUzs3KSeYavcoe0OQew/dJPuWJ2fDU8aO LwX7avZVqftVOAzbT3yiuaZXEQxShYdl7QdLan6mHMYEKOXGTW54kY4333QO2wpM6yzn P42LegXOak5nhVcXYqUPTiDv4fscpl/u5jfHgkV7c1ujC1xrRbtzXArl/xAeQ3/m7x0Y 32WMkMRZP5G0ubGoVNeS9mXC0J1h1dnB20GWh474Yz4RdqPFmKVLuojNVKijCQ3rOuCJ 6Aqnff7fvv0b8omHT3Lc47IOnbX3bqUeL7EGNiTWfUHJJ0TgShiTIpRi6Ng/dtp1LJGU eFIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687723561; x=1690315561; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6SoUflbTM/FpgEV6FO9AKFH9tH6vucslhbHlIS2yfeM=; b=KGCRMHKIGfsD2zRDo1YNxaJOITp2O7jIbmImmZ+2gBxx0KVhU2U8KEpQfFD7xo+Ah2 ygbHTpY3ARPkTDkHywGOsHj8JvfJ9TfZAn9Ov3cLV19hlVLymiMAS4g0FJvy6fR0VqlQ Ok/syqKf7ixO0H6JAjFANokQou6UuYCugorTE6Ff/pS1ZR3lCsX9iQucBkYRcgv3Enci xqRspxa+R2xQ+WFU8XktLpzcJdB/2NMrcepeZamtPj6L8QneID02JdxkYCba6Gd2OBHl V/sjiOLgv30iTJQ3FecNGM2z2yfdwEj3SBfacs53090rTwYCef1z8h2yWTKvt86FgdAs 2T1g== X-Gm-Message-State: AC+VfDwcd2Uv2nxd3Rfdp2UdpMgR0y+10TD1iyamhuQNzZ6/tx9q4swj vs+eYncH1/XBrkN4eystNxPwJg== X-Received: by 2002:a05:6a20:918d:b0:126:f0d8:445e with SMTP id v13-20020a056a20918d00b00126f0d8445emr2746471pzd.32.1687723561054; Sun, 25 Jun 2023 13:06:01 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id p2-20020a62ab02000000b0067777e960d9sm456469pff.155.2023.06.25.13.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jun 2023 13:05:59 -0700 (PDT) Date: Sun, 25 Jun 2023 13:05:59 -0700 (PDT) X-Google-Original-Date: Sun, 25 Jun 2023 13:05:16 PDT (-0700) Subject: Re: [PATCH v2 0/4] riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION In-Reply-To: <20230625-radish-comic-b0861fb96023@spud> CC: jszhang@kernel.org, ndesaulniers@google.com, bjorn@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 From: Palmer Dabbelt To: Conor Dooley Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 On Sun, 25 Jun 2023 05:43:13 PDT (-0700), Conor Dooley wrote: > On Sun, Jun 25, 2023 at 08:24:56PM +0800, Jisheng Zhang wrote: >> On Fri, Jun 23, 2023 at 10:17:54AM -0700, Nick Desaulniers wrote: >> > On Thu, Jun 22, 2023 at 11:18:03PM +0000, Nathan Chancellor wrote: >> > > If you wanted to restrict it to just LD_IS_BFD in arch/riscv/Kconfig, >> > > that would be fine with me too. >> > > >> > > select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if LD_IS_BFD >> > >> > Hi Jisheng, would you mind sending a v3 with the attached patch applied >> > on top / at the end of your series? >> >> Hi Nick, Nathan, Palmer, >> >> I saw the series has been applied to riscv-next, so I'm not sure which >> solution would it be, Palmer to apply Nick's patch to riscv-next or >> I to send out v3, any suggestion is appreciated. > > I don't see what you are seeing w/ riscv/for-next. HEAD is currently at > 4681dacadeef ("riscv: replace deprecated scall with ecall") and there > are no patches from your series in the branch: > https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/log/?h=for-next It's been in and out of staging a few times as we tracked down the performance regression, but it shouldn't have ever made it to linux-next for real. I'm fine just picking up the patch to disable DCE, I've got a few other (hopefully small) things to work through first though. > Cheers, > Conor. > >> > > Nick said he would work on a report for the LLVM side, so as long as >> > > this issue is handled in some way to avoid regressing LLD builds until >> > > it is resolved, I don't think there is anything else for the kernel to >> > > do. We like to have breadcrumbs via issue links, not sure if the report >> > > will be internal to Google or on LLVM's issue tracker though; >> > > regardless, we will have to touch this block to add a version check >> > > later, at which point we can add a link to the fix in LLD. >> > >> > https://github.com/ClangBuiltLinux/linux/issues/1881 >> >> > From 3e5e010958ee41b9fb408cfade8fb017c2fe7169 Mon Sep 17 00:00:00 2001 >> > From: Nick Desaulniers >> > Date: Fri, 23 Jun 2023 10:06:17 -0700 >> > Subject: [PATCH] riscv: disable HAVE_LD_DEAD_CODE_DATA_ELIMINATION for LLD >> > >> > Linking allyesconfig with ld.lld-17 with CONFIG_DEAD_CODE_ELIMINATION=y >> > takes hours. Assuming this is a performance regression that can be >> > fixed, tentatively disable this for now so that allyesconfig builds >> > don't start timing out. If and when there's a fix to ld.lld, this can >> > be converted to a version check instead so that users of older but still >> > supported versions of ld.lld don't hurt themselves by enabling >> > CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y. >> > >> > Link: https://github.com/ClangBuiltLinux/linux/issues/1881 >> > Reported-by: Palmer Dabbelt >> > Suggested-by: Nathan Chancellor >> > Signed-off-by: Nick Desaulniers >> > --- >> > Hi Jisheng, would you mind sending a v3 with this patch on top/at the >> > end of your patch series? >> > >> > arch/riscv/Kconfig | 3 ++- >> > 1 file changed, 2 insertions(+), 1 deletion(-) >> > >> > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >> > index 8effe5bb7788..0573991e9b78 100644 >> > --- a/arch/riscv/Kconfig >> > +++ b/arch/riscv/Kconfig >> > @@ -116,7 +116,8 @@ config RISCV >> > select HAVE_KPROBES if !XIP_KERNEL >> > select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL >> > select HAVE_KRETPROBES if !XIP_KERNEL >> > - select HAVE_LD_DEAD_CODE_DATA_ELIMINATION >> > + # https://github.com/ClangBuiltLinux/linux/issues/1881 >> > + select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD >> > select HAVE_MOVE_PMD >> > select HAVE_MOVE_PUD >> > select HAVE_PCI >> > -- >> > 2.41.0.162.gfafddb0af9-goog >> > >>