Re: [PATCH v3] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel cpu

From: Shuah Khan
Date: Thu Mar 10 2022 - 15:32:28 EST


On 3/10/22 1:18 AM, tan.shaopeng@xxxxxxxxxxx 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