lkml.org 
[lkml]   [2022]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel cpu
From
Date
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

\
 
 \ /
  Last update: 2022-03-10 21:33    [W:0.049 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site