Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12852360rwd; Fri, 23 Jun 2023 11:34:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4bkJDg40nFRpeXF/qNtEjdVwYle0UWg7CxxqUTVNr0NASqhQ4dUXq99ovsfgN3MRP0lFaB X-Received: by 2002:a17:902:c1c6:b0:1b5:553e:4ea1 with SMTP id c6-20020a170902c1c600b001b5553e4ea1mr25473plc.1.1687545261757; Fri, 23 Jun 2023 11:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687545261; cv=none; d=google.com; s=arc-20160816; b=cM4M9O6QCfJA2sb9p2uKbStqOx48U122uFaKrafgfAQjcVIQSq+4KlHnDJsh6fGW4H FVQGMk77zgPmp4BZPN068PQMnnvTgY0U975oCiz7SQsNCxLG/vdG6tRWrey5yP5Nb4h4 NcSBUT03mU/TT5/fg0qT25awfmJCfuhDA/ARBze5/1oK5Rh6tdh3mArr5OlFapDeVEMT ymnYc5CdFP6KQ9++UzLo0qyqfdzczHh5wqK76lWJrOmbFpWw+xmreb5uknz0AoBCp0Ag 0AnOleEuADDGnWbl6M/RZ2SUJXJbjiNBceJ+wAp2R3aSW4sz4U1GwJlET2dD9nVGBiHK soSg== 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=LfbqvLK9Qfv4YF15RNhH25UogTHD/trEiy3T/djOfaI=; b=iu8NtyzAWRt6YZOeYtekOCTJauwqkuQ45/Dvo8AwsbZiEY1XAjjDy2FU8UN8PvU8Uw kMJ3MPN7SZP0dbnwZB/QoX0qb38xv55Mlrtb74DDoLIbV4lre0/YFRmLfEvTlJ9wt237 NU22yODWiN9eP2evVCaHr8fkJ+4mD/A53w1e3ylG2l/Y6SLht9/DcL9VdhqqM2+EPCdN vv3h8eWeCAf/N8AA88ECvpAye915bLeAncv8GEzOfwjKQeg5dv5/mSpeen7smbwgOgSc lJ5DWvruj9P1wG8FInB81ov9athzdxrpHadwcsF4Kl9bmvW2LpipC4hBXL0elrGD3ssQ iiSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=xOUmQpxH; 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 lg5-20020a170902fb8500b001b23d4573b2si8572006plb.27.2023.06.23.11.34.09; Fri, 23 Jun 2023 11:34:21 -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=xOUmQpxH; 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 S232202AbjFWRSD (ORCPT + 99 others); Fri, 23 Jun 2023 13:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231947AbjFWRSC (ORCPT ); Fri, 23 Jun 2023 13:18:02 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C29831993 for ; Fri, 23 Jun 2023 10:18:00 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6687446eaccso682799b3a.3 for ; Fri, 23 Jun 2023 10:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687540680; x=1690132680; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LfbqvLK9Qfv4YF15RNhH25UogTHD/trEiy3T/djOfaI=; b=xOUmQpxHu7os+Nl9EESJkSZpvheHF8R0/sK0BJUwzYmbVPkrFsxgP0foSUrW6iU4aq UF3xAkqE/VQAdENo2u2TZQK4mAiELlsY6HtfQ43Cm8EmQg1yaSwXCM5MBtld7piogO6f +EhhdZef5ZKc8DVOi+seiGnsx3r8I2oEXhtM37lXnlpfMEFseJyRe83uUgPhvd+REw1j PJBVzSmoaqCMXKyOoBrT+HjbScoIx8Uva/BygNV9SPRldIqdXvoicmEGg06guAEaRYaC /P1XRwjnSw2pdUekcxWt35N5S23ReO09GHZaQGrQcOWzcAuU/4vfBkzun4QRLzoP07Ye bvGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687540680; x=1690132680; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LfbqvLK9Qfv4YF15RNhH25UogTHD/trEiy3T/djOfaI=; b=jc6HhkHuDGCBGHltwT2BDEU1kOsH6/6hC0tlDHwZu7k7VMJVNMDUToRcpFfPIQx493 RriZrxdf19t8MAfHWKTel6DnmJH30NQuzELmTqSdz0IgJXMP0Ty+h2OWeHinNJMtCUSG vUKzzzlQcryKbgu13x6wDNLjj1ew9sRf1xLkxjahOOUuBnSMmHcDpoBXY6WzSwgamUJJ blNSAixdXNoYSV6yoHXjWPfCfXscke/SnLAl6ZBvBqtx0fHSAffw9sYy1dKA32PcQTnX Mj3Ludq2lKZpULLBMYih4zs5r2fUUnbiOs/FNkih9nDoy5jmGU9E/wJ7FCCsTqCGmYwa pjzw== X-Gm-Message-State: AC+VfDwbFzRuMA/HZ8qLFAblFBkHfv9XGGKCdwoTh51pTBRNCoL+kjBd XQTcTEoYlCApBbaS/75KcEMebg== X-Received: by 2002:a05:6a00:1989:b0:668:8b43:8ded with SMTP id d9-20020a056a00198900b006688b438dedmr15678103pfl.26.1687540680069; Fri, 23 Jun 2023 10:18:00 -0700 (PDT) Received: from google.com ([2620:15c:2d1:203:bcd2:2fb7:43de:322f]) by smtp.gmail.com with ESMTPSA id g11-20020aa7818b000000b0064fd4a6b306sm6320547pfi.76.2023.06.23.10.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 10:17:59 -0700 (PDT) Date: Fri, 23 Jun 2023 10:17:54 -0700 From: Nick Desaulniers To: Jisheng Zhang Cc: Palmer Dabbelt , 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 Subject: Re: [PATCH v2 0/4] riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION Message-ID: References: <20230622215327.GA1135447@dev-arch.thelio-3990X> <20230622231803.GA1790165@dev-arch.thelio-3990X> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Ntym+K/CqqiHps72" Content-Disposition: inline In-Reply-To: <20230622231803.GA1790165@dev-arch.thelio-3990X> 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 --Ntym+K/CqqiHps72 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? > > 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 --Ntym+K/CqqiHps72 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-riscv-disable-DEAD_CODE_ELIMINATION-for-LLD.patch" 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 --Ntym+K/CqqiHps72--