Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9889297rwd; Wed, 21 Jun 2023 13:15:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4jMfulFCYw5y8lEkiyi2+lFWN5MuVFmpe6A/87T1wsh6ZAt3xhzWI4PqpjmypPHuwHo3w+ X-Received: by 2002:a05:6a21:6811:b0:ff:8d85:9f24 with SMTP id wr17-20020a056a21681100b000ff8d859f24mr13294224pzb.50.1687378506445; Wed, 21 Jun 2023 13:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687378506; cv=none; d=google.com; s=arc-20160816; b=R9Nry3GnjwJ/iV+5pkqNvpNZuQBX6I0o0HUxsK+SJvswt3SUv0fZySzJU4ekwNrkpi GIce+UouaAW3ljLNlTU7O1a3VFd6QPWzoYGv5mIkf6AtifVyV5+JZBCuepPKYm2HGC9S hlaV5+0O2HP9+YQTPFaDVxc+2YVQ4XYfKMpNPmicIWcI6CK21AmkZG3rGcIVNz9ANRS9 3VWO/I/t14yHwSzqC52n3EM4EIejePfFIbzTYkDJgJHVsBVPStLXbAuzaU3HU8OSrt+I GveYH4k80QPz2sC9FWBNHvQEg4P7QjQwcdS025BEw3ln/xt/DXWesZltoRRYa3fQJ8Qg hrsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:to:from:cc:in-reply-to:subject:date :dkim-signature; bh=yAEYX8p4xEPzztgSX6jBgXp6p/Xb2RUIX5fAtspxlsk=; b=jx/FCd9cXhmfED+rXspqFYG+zjufwbgSgDk8wF7mdP7cloWoadrjMoO8Y3uh7DPmxb 4jGPTdU4fjYyOXWW6QsG2QiQf4V8BaJw/9+rU/m9kik2olFLXIzEIFQJQZn1DUx94nIF +vXrq56A78qx2cKsUS9PAz19buLIgZ52cNfDK5b9XPaUaGtISV4zIA3oO4LJNFzqmM7w TJj5fuCepD7uOoxJdZ1e/8ZN3SeUDQGqChEmNSAGzpKj8OpGn+c+/AJwy8Kh9yv+D9I0 9k80IXR9FXqnF9V2ELpPjW0pt6pdfSXJ+lX6Z1q3LjCjlfX5HXqbeK6jhOfYh+BC+jM9 J23w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=O+py1+Rp; 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 x8-20020aa79ac8000000b0064d72c6eab6si4742207pfp.274.2023.06.21.13.14.53; Wed, 21 Jun 2023 13:15:06 -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=O+py1+Rp; 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 S230322AbjFUTq3 (ORCPT + 99 others); Wed, 21 Jun 2023 15:46:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230274AbjFUTqY (ORCPT ); Wed, 21 Jun 2023 15:46:24 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A101735 for ; Wed, 21 Jun 2023 12:46:23 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-543ae674f37so3510536a12.1 for ; Wed, 21 Jun 2023 12:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1687376782; x=1689968782; h=message-id:to:from:cc:in-reply-to:subject:date:from:to:cc:subject :date:message-id:reply-to; bh=yAEYX8p4xEPzztgSX6jBgXp6p/Xb2RUIX5fAtspxlsk=; b=O+py1+Rpcwp6w+AR4wey7NcLDxvddKtqNBonT+E2kowjbpXM93WK2d43d5Lo5eadvb i1DD8KpxveaNKlUarBlGyvv63EeTdAtgxwo23u1pgyTF7sMO2mlwVF04KbyxzEbx2IBq SVO7gg7973NHQ5PTrGDCCXBdnKUOJiIhuf0NTRX3jPr5EEE369JzQbXVvqwODDHVK80h H5vDaJf2v9Gcr8imIk5JdCHcKtI0UlFmWGXHvOMXroAd/7QvwD7ulLCMX3q7tP2dskCM GDPPpffLk6SXcGT+pZT3hWOQu6LHlBrT6Gd4QG7Dye4iUkxqC2t1+iztrMudIflP44WK oUJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687376782; x=1689968782; h=message-id:to:from:cc:in-reply-to:subject:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=yAEYX8p4xEPzztgSX6jBgXp6p/Xb2RUIX5fAtspxlsk=; b=haXFytCBMR7UZq5Y1G0L1o5NG9oFg1vfEPZeI+cZMTwGqet1q5nzUwVDWq1saP5eAy 52usdG49eIdZX2CfHqSvEQhLaCl+QkTRUB7PxCbgEDUi+uKUtG1zQpQp83tEI+vvgOju h2jlQ4ADYf3CIBAzwlYZJF1UOLLSONkGNhGpJqa89/QnplZIQ8klkk076AnRFRIRkivq EQhFOFYZZoj6UVxfcjy6HQ9ME7NLEF4lfquW7k9d8c3W7vRm80m9XPtUjRXefStS7ECq 8uHrAsAm+QYVOuFXiPYlTK29t7KdBNHubfMkKjuwLz0qFHbdo9qBTuoX8qZ0ukhpMsNn c2aA== X-Gm-Message-State: AC+VfDw/Ai9kI5mbaBtNZFuC8cAn+MN5pYjmikzuXBpUB8TPrPOMoC3d TZNWrQsI3xPbtc31m0EjFt5t0A== X-Received: by 2002:a05:6a20:13d9:b0:123:89f0:ec6b with SMTP id ho25-20020a056a2013d900b0012389f0ec6bmr1062014pzc.47.1687376782376; Wed, 21 Jun 2023 12:46:22 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id fe15-20020a056a002f0f00b006687f6727e1sm3222011pfb.206.2023.06.21.12.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 12:46:21 -0700 (PDT) Date: Wed, 21 Jun 2023 12:46:21 -0700 (PDT) X-Google-Original-Date: Wed, 21 Jun 2023 12:45:41 PDT (-0700) Subject: Re: [PATCH v2 0/4] riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION In-Reply-To: CC: 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, nathan@kernel.org Message-ID: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,PP_MIME_FAKE_ASCII_TEXT,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 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 >> CONFIG_CC_VERSION_TEXT="Debian clang version 16.0.6 (++20230610113307+7cbf1a259152-1~exp1~20230610233402.106)" >> >> >> Björn