Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp790158iob; Wed, 18 May 2022 13:04:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrDU7mihP/+LEhsf0f1E1d1rPundvkqttkIR6SpG2/jrEAeEjZ/8upU1rYtecujUsPf6i+ X-Received: by 2002:a63:5960:0:b0:3f2:3f20:4223 with SMTP id j32-20020a635960000000b003f23f204223mr936319pgm.151.1652904267826; Wed, 18 May 2022 13:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652904267; cv=none; d=google.com; s=arc-20160816; b=jhnUaLEgdGc0UK8TRuGMTM5fE1/CNcb78dqKYImVQFveaTRsyMF+juW/hDn8PlXwmM vdyUzEpEnlBEcX2xWHNG1yFSOkC7mDkB935IDAEfyRS/JbAGoueAql/RJe6/jnSHWiIj ePOoWqfX6g78rCyxTLyfkTz+Zv0xbJtnq6lwyaK9Sarx8soIuUAew7GXInhmlHCG5p7f yZ/xv/27c8hI2cTyZm4aW6pNkjXum7CBW8xfcP9jVc+WJhooB9+11vPm3/IN1Yufa4Fo BnKbhbXCKrZIsGgk0tkxO47WskbXQ0MWeGPuxxwGX4l1oz636s4FJiw/KZs38uqCMz40 LLhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=mj28eAA7jFmQsuBi8F2d/CpOSog8MsvJJWpWNUXOAqY=; b=uPXyIFuaGd4LRrAlYpVsoSWBy2RTqxRDNlpMnhNBYx6QD8/xXFdJeObpsbuR4L4oTN +3iB0b5wVN3Dq1pNuZi7dC1155xDfQTw0B0s1ag/ZvfITwROHwNNC2wvO0i0fJCfUsvt ZfZf6CCNca46pKWcvNkE/vUntWhdSX/QdZRqqpUyf7Z6RlayeWWZPcvVxjoI/Hu9gAAb hqp2dZVFZROQUKjSc1gMHgqLd8ykKto+fDkSQzlEGK5Ka/BOVXlvdIA2AaFMvHofr0C/ ESinTyJYdp+lDmKnl8UEpfJhbcvcK4jbs+Er7DMIkli0b+p6wTGEQ7oEosudla8W0Z3T EYWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=c0xg0dXT; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x8-20020a170902ec8800b0015ea47c0dd5si4457154plg.571.2022.05.18.13.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 13:04:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=c0xg0dXT; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 16DEC1F2D79; Wed, 18 May 2022 13:02:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242191AbiERUCo (ORCPT + 99 others); Wed, 18 May 2022 16:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242110AbiERUCm (ORCPT ); Wed, 18 May 2022 16:02:42 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE88B1EE091 for ; Wed, 18 May 2022 13:02:40 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id d3so2251153ilr.10 for ; Wed, 18 May 2022 13:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mj28eAA7jFmQsuBi8F2d/CpOSog8MsvJJWpWNUXOAqY=; b=c0xg0dXTIMvvVLpM9pxFLIASs/USM8les0/qR9K+D5itQ2NBoW4ldkbunCJnr9ftRh YMT2nk4JcRIYdccAZ/hFCsq8zvh+VCtCwc/saB48SkxtDSQ0+Yo6zFqzAuxHa3IqZY5K Km4+KzVtjrJb6hTD7I3HrzpSO2+CbIczQlJNM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mj28eAA7jFmQsuBi8F2d/CpOSog8MsvJJWpWNUXOAqY=; b=gl2QskxB2w1HNnpGC7CXlnjyINAt3hqRjP2m9h7v/9Yjiko+IVVIvyxWN8O1LMljhl z0+crfqSE9BbdQ1Z8tlPyWua2pmdUl9Junfg5Zjv0cOr5ok09A9GxNDzgDRPdPIeLjXP oqElnVTsO/dtHhvJ9P7d0wH58Tsc9qfw9K6ksSurL+c9CLlYiO3CX7jPLAKQVDpRhNiM RPBUlfBEts5I6A3lWKSzY2eoA1tjmqPgeq4R8/1Uc2Nv7VGYNhYqJDSNsP7z8M43YDpW METmSNS97cspd3NzvpVpYG4xwDdq8EmtMGA+mZX2NDGiszGocaeUEwaPV1kqlaN1WY2O aPAw== X-Gm-Message-State: AOAM533Kn4Ip7oPy7bKylt7t6kEQ81bT+YIAHIGqVjiyBnI7p+2VYhG4 eQ7YPvlRZPYH7qGOGK91ZK5ObA== X-Received: by 2002:a92:d20b:0:b0:2d1:1588:385e with SMTP id y11-20020a92d20b000000b002d11588385emr756936ily.23.1652904160177; Wed, 18 May 2022 13:02:40 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id e17-20020a022111000000b0032e2c859d8esm110971jaa.138.2022.05.18.13.02.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 13:02:39 -0700 (PDT) Subject: Re: [PATCH V5 0/3] Add unit test module for AMD P-State driver To: Huang Rui Cc: "Meng, Li (Jassmine)" , "linux-pm@vger.kernel.org" , "Rafael J . Wysocki" , "Fontenot, Nathan" , "Sharma, Deepak" , "Deucher, Alexander" , "Limonciello, Mario" , "Su, Jinzhou (Joe)" , "Yuan, Perry" , "Du, Xiaojian" , Viresh Kumar , Borislav Petkov , "linux-kernel@vger.kernel.org" , Shuah Khan References: <20220505022913.329259-1-li.meng@amd.com> <615adab4-515c-7d61-5662-bd342b759d6d@linuxfoundation.org> <27434868-1d0f-4493-3265-bea4e1dc8494@linuxfoundation.org> From: Shuah Khan Message-ID: Date: Wed, 18 May 2022 14:02:38 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE 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 5/17/22 11:19 PM, Huang Rui wrote: > On Wed, May 18, 2022 at 04:03:05AM +0800, Shuah Khan wrote: >> I reviewed the patches and the test driver amd-pstate-ut doesn't belong under >> selftests. I would recommend the following approach: >> >> - add this test driver under drivers/cpufreq >> >> - KUnit is a better fit for this unit test driver unless you want >> to be able to run this without KUnit configured >> >> - add the test script under selftests - the script then can load the >> test driver and run tests and unload the driver. >> > > Thanks Shuah. We would like to introduce more CPU benchmark testing based > the amd-pstate-ut next step, it may not be all the stuff in the kernel > module. E.X. use the script to trigger the tbench, gitsource, kernbench, > netperf, speedometer, and etc. testing and monitor the cpu frequency and > performance goals change, power consumption at runtime. Can the KUnit + > Kselftests work more straight forward in user scenario? > I am not sure if I understand your question. Also I am not sure if understand the scope of the testing you are intending to do using amd-pstate-ut. tbench, gitsource etc. are external tests (meaning not in kernel repo). Do these tests depend on amd-pstate-ut? It would be helpful to understand the scope first. What exactly will amd-pstate-ut used for? Based on the patch series it looked like: -- amd-pstate-ut has unit test code which will be triggered from kselftest This is perfectly fine. The driver can reside under drivers/cpufreq and a test.sh can reside under selftests. It can just use kselftest framework. Based on what you are saying. kselftest might be a good choice. thanks, -- Shuah