Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02CE2C64ED8 for ; Sat, 25 Feb 2023 00:25:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbjBYAZ2 (ORCPT ); Fri, 24 Feb 2023 19:25:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjBYAZ1 (ORCPT ); Fri, 24 Feb 2023 19:25:27 -0500 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCB7A63A3E for ; Fri, 24 Feb 2023 16:25:23 -0800 (PST) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-53916ab0c6bso24305687b3.7 for ; Fri, 24 Feb 2023 16:25:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qxTzs0Lg6/y7hSm8HzByaKGhxqTF5zrCh6SMRyb4Xys=; b=rR8iucnpz39sq+JL+puu6LgpfB7M3C+cPq6RL2Cd7ujgZ1QMmvOs5fDHUvMxhUNaAN m+jJIWSikfUzSfKPRAIT8JMCduOV2/04wUjm55dpV2OJE+r4iI58BPF2ph0q42BEWAfD Ob1KKfKcVlgDfo5IIzWsjda6QXXjqDFUnOIOCw9aCzZX1e/TD/wef0AiOwgqXfmhQl6d e67QsI0T779pBDpoqbsMRhzKTyAqI5Gw/d5iNLqVyNmq0zrDBh8cH9kObEvsXjx9hbSE ZYH7amxQ5zHO8Xy00sFXdtz8EXt06QqBLOGAK7OFsK8EZiUM6tBTgVLlLEsTzQvpu3+k 2MTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qxTzs0Lg6/y7hSm8HzByaKGhxqTF5zrCh6SMRyb4Xys=; b=m/daAfhdfRXc9xG8PjbWg5i1gGJp0PbyMWj5k1tu6y1G9lrWSRXFzvBtHOc7pNVsqK vSyx31knBhRVFWHPNhu+UdRK2gmSdKqj8uGNxpdCCefjDYEyPEtJ3JN/kOSvL5XfZUw+ tHH9lHca9cRlrqZkQReFcpysI3UjKGGy466VnD71nSjN35dNOYuQNSO0fIlMxc4x/rrW cX7JaLHGsURpby/vXKfCQdSlIRGCeur7W5E6UlL7vePOCK5wvp18Nze2lFadJzlvhrV5 +WpfCROYaEFhMY+wPXvP2Q3t7BuYrukhGKqy1In56rcQEvvG8r6k8OjOBH90g2fazQzO 2bZg== X-Gm-Message-State: AO0yUKUYRbCM4rRu29fZx45F52VqyHjhObuvlDq0iRIXMbxlx+VLezSL zjvRSNovSS6FjKoLV5yQIrK0BF2nVpdFVVP3wcBT9w== X-Google-Smtp-Source: AK7set9/s6MqiL5vrYzNlW80C1p9m82ZTZ7l6K+tReN5z/8pigW+XUSm6O293ENFGUsTUi1mssyjE4IKHzYx7ehFHuI= X-Received: by 2002:a81:4425:0:b0:52f:69d:cc75 with SMTP id r37-20020a814425000000b0052f069dcc75mr5532545ywa.6.1677284722871; Fri, 24 Feb 2023 16:25:22 -0800 (PST) MIME-Version: 1.0 References: <02cf36b9-6526-576b-1fd3-a59b67c8c123@linuxfoundation.org> In-Reply-To: From: David Gow Date: Sat, 25 Feb 2023 08:25:11 +0800 Message-ID: Subject: Re: [GIT PULL] KUnit next update for Linux 6.3-rc1 To: Linus Torvalds Cc: Shuah Khan , shuah , Brendan Higgins , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000001e12c905f57b48cc" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000001e12c905f57b48cc Content-Type: text/plain; charset="UTF-8" On Sat, 25 Feb 2023 at 07:23, Linus Torvalds wrote: > > On Tue, Feb 21, 2023 at 5:51 PM Shuah Khan wrote: > > > > This KUnit update for Linux 6.3-rc1 consists of cleanups, new features, > > and documentation updates: > > Hmm. I have not actually bisected this or tried to otherwise figure > out exactly what is wrong, but the kunit code ends up being really > annoying for my build testing. This will be due to 7170b7ed6acb ("kunit: Add "hooks" to call into KUnit when it's built as a module"). The "hooks.o" file is special in that it needs to be built-in even when the other KUnit files are built as a module, and clearly the kbuild hackery for that has fallen apart. > > In particular, if I do > > make > > repeatedly - ie with no other changes in between - the kunit code ends > up re-building itself for no apparent reason. > > Which then causes a re-link and makes it all really slow. > > Maybe I'm barking up the wrong tree, but just do > > make allmodconfig > > and then do two plain "make"s in succession (feel free to add "-jXYZ" > to make it go much faster ;). > > The second build - that shouldn't have to re-build anything - still does this: > > CALL scripts/checksyscalls.sh > DESCEND objtool > CHK kernel/kheaders_data.tar.xz > CC lib/kunit/hooks.o > AR lib/built-in.a > CC lib/kunit/hooks.o > AR lib/kunit/lib.a > AR built-in.a > AR vmlinux.a > LD vmlinux.o > ... > > and it all takes much longer than an empty kernel build _should_ take. As best I can tell, this is kbuild getting very confused by the way we're adding lib/kunit/hooks.o directly in lib/Makefile (rather than going through lib/kunit/Makefile). Moving lib/kunit/hooks.c -> lib/kunit_hooks.c and adjusting the makefile to match _seems_ to fix it here: --- diff --git a/lib/Makefile b/lib/Makefile index 469be6240523..bb87df427cff 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -131,10 +131,8 @@ obj-$(CONFIG_KUNIT) += kunit/ # Include the KUnit hooks unconditionally. They'll compile to nothing if # CONFIG_KUNIT=n, otherwise will be a small table of static data (static key, # function pointers) which need to be built-in even when KUnit is a module. -ifeq ($(CONFIG_KUNIT), m) -obj-y += kunit/hooks.o -else -obj-$(CONFIG_KUNIT) += kunit/hooks.o +ifdef CONFIG_KUNIT +obj-y += kunit_hooks.o endif --- Splitting the KUnit code up like that is a little bit ugly, so I'm open to any suggestions of how better to structure it. Regardless, I'll play around a bit and see if I can come up with anything better before sending that out. Sorry for the inconvenience! -- David --0000000000001e12c905f57b48cc Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPnwYJKoZIhvcNAQcCoIIPkDCCD4wCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggz5MIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0yOTAzMTgwMDAwMDBaMFQxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSowKAYDVQQDEyFHbG9iYWxTaWduIEF0bGFz IFIzIFNNSU1FIENBIDIwMjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvLe9xPU9W dpiHLAvX7kFnaFZPuJLey7LYaMO8P/xSngB9IN73mVc7YiLov12Fekdtn5kL8PjmDBEvTYmWsuQS 6VBo3vdlqqXZ0M9eMkjcKqijrmDRleudEoPDzTumwQ18VB/3I+vbN039HIaRQ5x+NHGiPHVfk6Rx c6KAbYceyeqqfuJEcq23vhTdium/Bf5hHqYUhuJwnBQ+dAUcFndUKMJrth6lHeoifkbw2bv81zxJ I9cvIy516+oUekqiSFGfzAqByv41OrgLV4fLGCDH3yRh1tj7EtV3l2TngqtrDLUs5R+sWIItPa/4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