From: Shuah Khan <skhan@linuxfoundation.org>
To: "tan.shaopeng@fujitsu.com" <tan.shaopeng@fujitsu.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Reinette Chatre <reinette.chatre@intel.com>,
Shuah Khan <shuah@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v3] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel cpu
Date: Thu, 10 Mar 2022 13:32:18 -0700 [thread overview]
Message-ID: <480705b1-6f22-e129-2db0-2a9c5841eacc@linuxfoundation.org> (raw)
In-Reply-To: <TYAPR01MB63307F1C04270DD2D09ACF238B0B9@TYAPR01MB6330.jpnprd01.prod.outlook.com>
On 3/10/22 1:18 AM, tan.shaopeng@fujitsu.com wrote:
> Hi Shuah,
>
>> On 3/4/22 3:39 AM, Shaopeng Tan wrote:
>> Also need to be rebased on mainline latest
>
> I will rebased on mainline latest in next version.
>
>> Why is this a global? I am not seeing a reason. These detect_*()s could be
>> moved to resctrl.h and get rid of globals.
>>
>> Instead of adding intel check to detect_amd() add detect_intel() or is_intel()
>> and have ut return true of it detects intel.
>
> "is_amd" and "is_intel" are called many times,
> in this way, detect_vendor is called only once.
>
You can do the lookup once and save the value to return for
subsequent calls instead of using global values is_amd
and is_intel.
thanks,
-- Shuah
prev parent reply other threads:[~2022-03-10 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 10:39 [PATCH v3] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel cpu Shaopeng Tan
2022-03-08 21:38 ` Shuah Khan
2022-03-10 8:18 ` tan.shaopeng
2022-03-10 20:32 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=480705b1-6f22-e129-2db0-2a9c5841eacc@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=shuah@kernel.org \
--cc=tan.shaopeng@fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox