Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11572269rwd; Thu, 22 Jun 2023 15:31:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dGyCnYUX9+45iymYpeewG2Soqu8ECov7SUq3KpDTPlRHJcaxiwM10/bxhmfJ4oLhFsKcr X-Received: by 2002:a17:90b:a4b:b0:25b:cfd4:c1b3 with SMTP id gw11-20020a17090b0a4b00b0025bcfd4c1b3mr12723686pjb.40.1687473096373; Thu, 22 Jun 2023 15:31:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687473096; cv=none; d=google.com; s=arc-20160816; b=JuHwI4TqxZFRYApU1C4B92ct2dGbvFMCB2QqfMWi7k+zgv03PsW26R1R9NWciz6Mms aAe9sqTwBQi4CVWZnDhqPj/qI7jDYE38wHPSh8c9Jc0QIBlGfsMdPEa83aaF+IzvL/31 NywOGaj5EEU2h/BQTcJHr4qTeXrInqHTR89AZzJqtSb3qLk6VFksEplvSittGJGQAgxi I6C/PSAQkqPsYBFEsr7pci6z8R+4Hx9Onk7cLiRA8cZAnP1anIjpByIms+zgZtD+QTh5 Re/4QO5RgHCg2VIgR/8xGqhUh+n5DMONaAjKbf1Hu2CXHEeHXcqerZa+RDEfCjQ2n9Kv E5PA== 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=jceW0LefNLIMcdHkXOkHyrZ6hyhvAWI/rnJOWQTlRkU=; fh=6gpHIByLMoP/J8csbShuVFWr3ZQaF4xdsNBBB+MHlQI=; b=T7QM2hb/YzZeQe6RysyYT9i1AqW2IKHKB1pZIBUOlDgo29+u0pvuTaoo9SvrD8WgC4 frunzxvuze9aJXZpjUPW0MvOG2aFZ2Awi5dRbaQcYociMDSAu7XOIPJ5Yb6B5/oafleO m0EUiDzNnaAGwPBN6I6kOTIkbrLwIoEwyy9F0h3fZU3MlMW3SJcswHGBV8LZkQ678yF8 EDrEotSkephq4m4VKNM+Sc8P5PP8Q5GvsWO5j+L+K7zAUvivtwvWAPqIWUdKS7ZmN1Ef tHDCt2ba45i7hTKM0M1vbE7g98ezKRffUs+39cdk22XI50HWXravMAyedpgJB4eWSB1C aAAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=ir6ofxvH; 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 12-20020a17090a194c00b002613598b9absi367295pjh.124.2023.06.22.15.31.02; Thu, 22 Jun 2023 15:31: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=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=ir6ofxvH; 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 S229802AbjFVVmI (ORCPT + 99 others); Thu, 22 Jun 2023 17:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjFVVmG (ORCPT ); Thu, 22 Jun 2023 17:42:06 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B94B184 for ; Thu, 22 Jun 2023 14:42:05 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-54fac3b7725so19417a12.3 for ; Thu, 22 Jun 2023 14:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1687470125; x=1690062125; 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=jceW0LefNLIMcdHkXOkHyrZ6hyhvAWI/rnJOWQTlRkU=; b=ir6ofxvHhRbxfpKb5tlLnQm2vqASmGbQrhU2aaNbUwdUqiHClocflNrOjfMKmUCDmc HY8ZWaV3y3lsUyonNzjpzPQNTOqx1/xpDI79l6COM49RMMPzygpLFxNjuIGX6KFzJlYl fMy+IqSex0XilMVkDQAT2P42JJmfFjprfJxcNZiop47QajWyVyGorI/at1DL1KLtm3tZ RYZgS4Agbb02afaoTEHcoeOrvqQ7bQkdR9ivL0PZ66d6ZXN/HC49IJMpu2ycyath9ECc g5plpTU/pfW7o1cTdufSQMMbiHSyWOyZlGtoA3Y0WWt80oh9rwggm0zw5NLUMVqRDnUB PQKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687470125; x=1690062125; 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=jceW0LefNLIMcdHkXOkHyrZ6hyhvAWI/rnJOWQTlRkU=; b=fOWPWXDI3IJuCHFDvl7uME3z8c0B51OiI01NuVJgxhhOAI+wSW77DjQyYQvdHztyJp GloY8T9MoDWtSGPrZJq+Dm0RZ7d57AZLwnTPOtiwmhh7lUVFIMUSfWX1db4AvHQF5qt+ sfdKc/nZ9xeyBAA6Lt5p/+rZ3X8e29AnO4j5D0u42pzhMQ0m3PlaeJwgNjMTmE4pzuA0 tD3ZB5rkQVT2GqiwSEpQgJz7EO0ggJZ4NdtdcjnzRnH0k1Ci41rEid43hYckuJD7Iu+R GoNSRJb+p7ohRpy6LEuuKnmozZP4H8sOwtVU5XAzSfmmq/9jsohVJYUD5M7YuRm6RZes tx5A== X-Gm-Message-State: AC+VfDyujVH5QEReOYktrq79fZQDAQiqFjDdTqua8SW4Q/V/rVBQf72Z RZp4NPtXLzUGnKmBiNimL73nRQ== X-Received: by 2002:a05:6a00:174d:b0:64c:c5f9:1533 with SMTP id j13-20020a056a00174d00b0064cc5f91533mr16483486pfc.33.1687470124730; Thu, 22 Jun 2023 14:42:04 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id m2-20020aa79002000000b0064d1d8fd24asm4944130pfo.60.2023.06.22.14.42.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 14:42:04 -0700 (PDT) Date: Thu, 22 Jun 2023 14:42:04 -0700 (PDT) X-Google-Original-Date: Thu, 22 Jun 2023 14:41:24 PDT (-0700) Subject: Re: [PATCH v2 0/4] riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION In-Reply-To: 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 From: Palmer Dabbelt To: ndesaulniers@google.com 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 Thu, 22 Jun 2023 14:40:59 PDT (-0700), ndesaulniers@google.com wrote: > On Wed, Jun 21, 2023 at 12:46 PM 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-hour >> >>>> link time a regression -- unless it's expected that this is just very >> >>>> 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.. >> >> >> >> I took palmer/for-next (1bd2963b2175 ("Merge patch series "riscv: enable >> >> HAVE_LD_DEAD_CODE_DATA_ELIMINATION"")) for a tuxmake build with llvm-16: >> >> >> >> | ~/src/tuxmake/run -v --wrapper ccache --target-arch riscv \ >> >> | --toolchain=llvm-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 until >> > 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. Awesome, thanks! > >> >> >> CONFIG_CC_VERSION_TEXT="Debian clang version 16.0.6 (++20230610113307+7cbf1a259152-1~exp1~20230610233402.106)" >> >> >> >> >> >> Björn