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 67473C64ED8 for ; Sat, 25 Feb 2023 01:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbjBYBu5 (ORCPT ); Fri, 24 Feb 2023 20:50:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjBYBuz (ORCPT ); Fri, 24 Feb 2023 20:50:55 -0500 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18F1C67E06 for ; Fri, 24 Feb 2023 17:50:54 -0800 (PST) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-536af432ee5so29520977b3.0 for ; Fri, 24 Feb 2023 17:50:54 -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=wA198uy6HA0mm/3m/v/bpUGoFwswOMTgPq2CwuvYsjk=; b=puPDTGfPZBSbcS2H8jgO2WKminjD/2ebZtEE7/P/yduEYE3HdQtSXi80bQDsGd5W7O qDCWZpB1+CFGlODxIfV5foV/9iMVnea470uMsV5vY30CmG+LJaEYLVIv+QqrCdvK9L5t 964UWvcXdai/fRV+MhhQiZ3TOlKMQAozhZNJrttmFKfLNbdcyeWJXVKtI5RG8h/qA4nf eBcTjYMEYYxfpDHSY75vyYKun1735An9P9/gNwSzY3m3RFK7WqCjh7i3AweN8agsaqji NxUoIcNpd+wGjG9vN3+BCLnfnOP1UK0QZtIrKMoZSPw9704UKyiYaAU2y0HBjveT3e9e 3vXQ== 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=wA198uy6HA0mm/3m/v/bpUGoFwswOMTgPq2CwuvYsjk=; b=3Ozu/53z/TlBmxLAWAO2gVXVrlX/dP4x0VQsxqlJKW87E+ppFt+qJVje9YsR9Yfr0Q 7cG1Vt2iN8lP2SWx/MInIw+HELzRYn/bg8KIhSnILMFZlHmwoZ+bUgcmEMIRdR59f0LZ AIxneE5QPimxtlveJeDkuvhNs7ETDPDszku2ARbWWi1X1qHFvsgIqi750gOn5GkDhoAF vefJ4lmvfhku2qjOxMrkq6uDtlaxpIv2hFKiBfZ0N0JL7I95z6HvepW4rd3VdmBqV/aK WmCxD7wiF131PIfbMk6JgQC/+8O1QTRF7b6p7a+YgV0vMHhiw0ohhhChb5iLzpumpIKF +J+w== X-Gm-Message-State: AO0yUKVpn/BjEC3ZJw+2oKOklqNTxv5lF2NSK3ZXUycnzhz+lLfl3SxC neRrT6z3LYcz9KcR63xCgatm+KGfMWui3LYPyBgxSg== X-Google-Smtp-Source: AK7set8G9HDu7ztJyA023ROzcdsWIlydrFzmDlrgKSTIRP8aOwLIvIz8yc9ksf6dEYCpW0llptYKtZdE/hrNR9xPDRE= X-Received: by 2002:a81:ac58:0:b0:535:5e8c:65ef with SMTP id z24-20020a81ac58000000b005355e8c65efmr5617918ywj.6.1677289853117; Fri, 24 Feb 2023 17:50:53 -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 09:50:40 +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="000000000000e8167a05f57c79ec" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000e8167a05f57c79ec Content-Type: text/plain; charset="UTF-8" On Sat, 25 Feb 2023 at 08:25, David Gow wrote: > > 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. I managed to get it working by always recursing into the kunit/ directory with obj-y, which is cleaner. So this patch should fix it: https://lore.kernel.org/linux-kselftest/20230225014529.2259752-1-davidgow@google.com/T/#u Sorry again, -- David --000000000000e8167a05f57c79ec 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 6VBo3vdlqqXZ0M9eMkjcKqijrmDRleudEoPDzTumw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