Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2853870imw; Wed, 6 Jul 2022 12:53:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uTLdRvY8tY3h2jNp6m59Qxo7TmfjpfxFWE3lmKEtTAMT4QYA1cAfdUH7TW3kkdSB6JNcOc X-Received: by 2002:a17:907:869e:b0:72a:a008:82fc with SMTP id qa30-20020a170907869e00b0072aa00882fcmr26373954ejc.549.1657137197663; Wed, 06 Jul 2022 12:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657137197; cv=none; d=google.com; s=arc-20160816; b=ELIrOa9UvReZ967dL6DUPbdKMDBQaVSgZFCib7BeFLm0ex3QIzlPhJLC/Z18pHe/qh ralOOTSCcAsElL0fXXYywx+j1JJ8ZeRUvPZz7sjRMw2Frg9I/EfTMwS6jG/iWqw/VZ+7 s0OSdwpAu3nhvGFVgWqwdXv7hIidwzJsRSUL4aS2RDnbJUZIw1w6QFpzPxIpksMSa5R+ mtHRGTiccJK6e2zSOB+9/SCe/8kw2g7QsVYU/n7md3FcI5ru4euZ9mvzOunpN0LXlZTV rKTqMRn7tWgCdQCJjwKiUQT92EPSXhclN1OZHvjL8Y6Dn1Rkv5GzP66t4enLjH2xL4oG w2TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uQRsnwv9u5IuL08Zu0b0BsRI6BGP8zbhAD30ZwGOKSY=; b=NKKGPKuvnn3F99xV3q9dNeH7n7K63xcY55fm5ZtRkOmaNB+rduhRr4bXEDAQJKr/c6 tDQgcUAwgIX/cEau2+K7nA/BLv+kMtFsoUj1S3+lCOjVNnZOT/cj79pfilWdQ/2ytKDB i3Sg0bfSEsxJ4faqTfH6V5681RocIRnTMW6rCLRQKmi3192eMgJn37qnR4c9YWSA6Gul uNhY/fgxeXKKSuJWUQz0VH3K6GiTg/P/sJiPDT6iYka3tzW3b60rZgXnYjacyIueE8+y nUrt8a7+FO0chwrLcP87aWFLNvxJn3BoNrkxEApXNXClmDVYlZtFuA819cKe1D7YczIt 0sWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=mc2otIGu; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce21-20020a170906b25500b0072aa15584fcsi1892239ejb.822.2022.07.06.12.52.51; Wed, 06 Jul 2022 12:53:17 -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=@google.com header.s=20210112 header.b=mc2otIGu; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234097AbiGFTn0 (ORCPT + 99 others); Wed, 6 Jul 2022 15:43:26 -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-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" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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, 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