Re: [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Kacur <jkacur@xxxxxxxxxx> writes:

> On Tue, 26 Jan 2021, Punit Agrawal wrote:
>
>> Certain architectures such as arm64 don't have a "model name" in
>> /proc/cpuinfo. Relax the requirement to include the model name in the
>> description to allow running rteval on such machines.
>> 
>> Signed-off-by: Punit Agrawal <punit1.agrawal@xxxxxxxxxxxxx>
>> ---
>>  rteval/modules/measurement/cyclictest.py | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py
>> index 232bd6b..afe87f7 100644
>> --- a/rteval/modules/measurement/cyclictest.py
>> +++ b/rteval/modules/measurement/cyclictest.py
>> @@ -217,13 +217,13 @@ class Cyclictest(rtevalModulePrototype):
>>          for core in self.__cpus:
>>              self.__cyclicdata[core] = RunData(core, 'core', self.__priority,
>>                                                logfnc=self._log)
>> -            self.__cyclicdata[core].description = info[core]['model name']
>> +            self.__cyclicdata[core].description = info[core].get('model name', '')
>>  
>>          # Create a RunData object for the overall system
>>          self.__cyclicdata['system'] = RunData('system',
>>                                                'system', self.__priority,
>>                                                logfnc=self._log)
>> -        self.__cyclicdata['system'].description = ("(%d cores) " % self.__numcores) + info['0']['model name']
>> +        self.__cyclicdata['system'].description = ("(%d cores) " % self.__numcores) + info['0'].get('model name', '')
>>  
>>          if self.__sparse:
>>              self._log(Log.DEBUG, "system using %d cpu cores" % self.__numcores)
>> -- 
>> 2.29.2
>> 
>> 
>
> Conceptually this is okay. Maybe we should set a default name of 'unknown' 
> instead of an empty string? Also could you please log the situation when 
> it occurs - perhaps INFO level?

I was not quite happy with relying on 'model name' being the only
descriptor. From the excerpt of /proc/cpuinfo from an arm64 machine, it
includes information that describes the cpu (implementer, architecture,
variant, part, revision) just not 'model name'. Based on previous
discussions on the kernel lists, this is unlikely to change due to
/proc/cpuinfo being considered part of the kernel ABI.

    ...
    processor       : 1
    BogoMIPS        : 200.00
    Features        : fp asimd aes pmull sha1 sha2 crc32 cpuid
    CPU implementer : 0x41
    CPU architecture: 8
    CPU variant     : 0x0
    CPU part        : 0xd03
    CPU revision    : 4
    ...

To account for this, I updated the patch to use the other information if
'model name' is not available. Let me send the new version of the
patches and we can take it from there.

[...]



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux