From mboxrd@z Thu Jan 1 00:00:00 1970 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 ACB42CCA47C for ; Wed, 6 Jul 2022 19:43:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233058AbiGFTn1 (ORCPT ); Wed, 6 Jul 2022 15:43:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232584AbiGFTnZ (ORCPT ); Wed, 6 Jul 2022 15:43:25 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 790442C5 for ; Wed, 6 Jul 2022 12:43:22 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id o25so28848783ejm.3 for ; Wed, 06 Jul 2022 12:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uQRsnwv9u5IuL08Zu0b0BsRI6BGP8zbhAD30ZwGOKSY=; b=mc2otIGuBDLviocnQmzsnPStf1y6s1B8oLQEpaEnJtA0+MhjEcCuE30cMfGGAr7rSh 3Dr+s6Pq80xvdUdJzHes1T7/9AA0thSKQDzO8jdRKCx/jKghZOSQ9ETfXVLnGPdTwil6 YDPfTfKxnb2LaQl8RkQ3y+tiJAmuG0fB0CeL8X+/DYZUN3JT+7gdh67sPEmSki5WhIoF WdvK6x7P72Dk0c42qx+TzcKjLMUxLwGXY6RVlcH+FFIsckcUPUL3IIxSzX0jDxe5SCG9 qDcgUqD5ezsCVoOgcbhaMd/uKZiYkiToHfbQe3QmzCyWk6hKAKVHVi4ivbx2H0hQ1hjd Y0qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uQRsnwv9u5IuL08Zu0b0BsRI6BGP8zbhAD30ZwGOKSY=; b=HZyeltmN511GI3hJGyJg48wukS0IhGgWeXhKgmm1tI8yOoFqlEHKdeHqGghdbw6gZ2 hi7Sv9B43GhsK2nQ7o/3oi6DLIdILifHq6ocTkMLh72OKAc5nFYsXYfOLGnnna0VDnMx qExYLIFI8i5CbWqlVJ9Z30x2gfoZ8J+yac3EeQIAgzRCkWZIg2bQ+GwwKBL+EPhSPLI0 DYkK5hCxgCwIQYXBUIiy5TrUaGPM43K7KAiMOzuDdbZRjeg57tV4KuG5ZP4p+yN/ja1p yiPdXJzqk2ljEsejpeiYXeDpNZ+Gqt7mCo0Vk8wpD+C81Om2iWgjvVR4JwDHEmVxk4Lu T3kw== X-Gm-Message-State: AJIora90TBpfuimq/l3BR0ZbEdwG8bzGTFo4N4pVcoVFJXX7fDpA4FYp p1YiR+T6VQP3kgYQXCVA5c34uUWq0J3XZMr5lgNnIA== X-Google-Smtp-Source: AGRyM1t4dRFvvQJAo3o+9zwoctngRDgoPiYrC8YooMHhSrERSiGT4kieKFmITMD8tdqHtO7K0lhat2uj3BHpxqC84aA= X-Received: by 2002:a17:907:168c:b0:726:c521:25aa with SMTP id hc12-20020a170907168c00b00726c52125aamr40430672ejc.46.1657136600905; Wed, 06 Jul 2022 12:43:20 -0700 (PDT) MIME-Version: 1.0 References: <20220518073232.526443-1-davidgow@google.com> In-Reply-To: From: Brendan Higgins Date: Wed, 6 Jul 2022 15:43:09 -0400 Message-ID: Subject: Re: [PATCH 1/2] kunit: tool: Add x86_64-smp architecture for SMP testing To: Daniel Latypov Cc: David Gow , Marco Elver , Shuah Khan , Dmitry Vyukov , KUnit Development , kasan-dev , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 19, 2022 at 1:11 PM Daniel Latypov wrote: > > On Thu, May 19, 2022 at 6:15 AM David Gow wrote: > > > > I tend to agree that having both would be nice: I think there are > > enough useful "machine configs" that trying to maintain, e.g, a 1:1 > > mapping with kernel architectures is going to leave a bunch of things > > on the table, particularly as we add more tests for, e.g., drivers and > > specific CPU models. > > I agree that we don't necessarily need to maintain a 1:1 mapping. > But I feel like we should have a pretty convincing reason for doing > so, e.g. support for a CPU that requires we add in a bunch of > kconfigs. Agreed. That being said, if we have a good convention for archs that are not in arch/, then it should be OK. The biggest thing is that all archs passed into ARCH=, if supported, should have a default with the same value for kunittool; as long as that is the case, I don't think anyone will get confused. > This particular one feels simple enough to me. > Given we already have to put specific instructions in the > kcsan/.kunitconfig, I don't know if there's much of a difference in > cost between these two commands > > $ ./tools/testing/kunit/kunit.py run --kunitconfig=kernel/kcsan > --arch=x86_64-smp > $ ./tools/testing/kunit/kunit.py run --kunitconfig=kernel/kcsan > --arch=x86_64 --kconfig_add CONFIG_SMP=y --qemu_args "-smp 8" Also agree. > I've generally learned to prefer more explicit commands like the > second, even if they're quite a bit longer. I agree, but I think I learned this from you :-) > But I have the following biases > * I use FZF heavily, so I don't re-type long commands much Same. > * I'm the person who proposed --kconfig_add and --qemu_args, so of > course I'd think the longer form is easy to understand. > so I'm not in a position to object to this change. Yeah, I think I am a bit biased on this too, but I don't terribly care one way or the other. > Changing topics: > Users can overwrite the '-smp 8' here via --qemu_args [1], so I'm much > less worried about hard-coding any specific value in this file > anymore. > And given that, I think a more "natural" value for this file would be "-smp 2". > I think anything that needs more than that should explicitly should --qemu_args. > > Thoughts? If we have time, we could bring this topic up at LPC? > [1] tested with --qemu_args='-smp 4' --qemu_args='-smp 8' > and I see the following in the test.log > smpboot: Allowing 8 CPUs, 0 hotplug CPUs > so QEMU respects the last value passed in, as expected. > > > > > The problem, of course, is that the --kconfig_add flags don't allow us > > to override anything explicitly stated in either the kunitconfig or > > qemu_config (and I imagine there could be problems with --qemu_config, > > too). > > This patch would fix that. > https://lore.kernel.org/linux-kselftest/20220519164512.3180360-1-dlatypov@google.com > > It introduces an overwriting priority of > * --kconfig_add > * kunitconfig / --kunitconfig > * qemu_config