linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rteval PATCH 0/2] Relax some architecture specific constraints
@ 2021-01-26  2:12 Punit Agrawal
  2021-01-26  2:12 ` [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional Punit Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Punit Agrawal @ 2021-01-26  2:12 UTC (permalink / raw)
  To: John Kacur
  Cc: Punit Agrawal, dwagner, Ahmed S . Darwish, linux-rt-users,
	binh1.tranhai, Daniel Sangorrin

Hi,

Here are a couple of patches that enable running rteval on arm64
targets. A previous version was sent at [0].

The first patch removes the requirement for having a "model name" in
/proc/cpuinfo. This isn't provided on an arm64 kernel unless running
in "compat" mode.

The second patch uses the default kernel compilation target instead of
"bzImage" and "modules". "bzImage" isn't used on arm64. Instead of
building knowledge of architecture-specific targets it maybe better to
build the default. The default should build the kernel and modules
anyways.

More details in the patch commit log.

Feedback welcome.

Thanks,
Punit

[0] https://lore.kernel.org/linux-rt-users/877doa1uwx.fsf@kokedama.swc.toshiba.co.jp/

Punit Agrawal (2):
  rteval: cyclictest.py: Make 'model name' optional
  rteval: cyclictest.py: Make build targets architecture independent

 rteval/modules/loads/kcompile.py         | 2 +-
 rteval/modules/measurement/cyclictest.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional
  2021-01-26  2:12 [rteval PATCH 0/2] Relax some architecture specific constraints Punit Agrawal
@ 2021-01-26  2:12 ` Punit Agrawal
  2021-02-22 20:16   ` John Kacur
  2021-01-26  2:12 ` [rteval PATCH 2/2] rteval: cyclictest.py: Make build targets architecture independent Punit Agrawal
  2021-02-22  0:31 ` [rteval PATCH 0/2] Relax some architecture specific constraints Punit Agrawal
  2 siblings, 1 reply; 7+ messages in thread
From: Punit Agrawal @ 2021-01-26  2:12 UTC (permalink / raw)
  To: John Kacur
  Cc: Punit Agrawal, dwagner, Ahmed S . Darwish, linux-rt-users,
	binh1.tranhai, Daniel Sangorrin

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@toshiba.co.jp>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [rteval PATCH 2/2] rteval: cyclictest.py: Make build targets architecture independent
  2021-01-26  2:12 [rteval PATCH 0/2] Relax some architecture specific constraints Punit Agrawal
  2021-01-26  2:12 ` [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional Punit Agrawal
@ 2021-01-26  2:12 ` Punit Agrawal
  2021-02-22 20:18   ` John Kacur
  2021-02-22  0:31 ` [rteval PATCH 0/2] Relax some architecture specific constraints Punit Agrawal
  2 siblings, 1 reply; 7+ messages in thread
From: Punit Agrawal @ 2021-01-26  2:12 UTC (permalink / raw)
  To: John Kacur
  Cc: Punit Agrawal, dwagner, Ahmed S . Darwish, linux-rt-users,
	binh1.tranhai, Daniel Sangorrin

Not all kernel archiectures provide the "bzImage" target, e.g., arm64
provides "Image" which generates an uncompressed kernel binary.

Instead of going down the path of customizing build targets
per-architecture, let's drop them altogether. The default kernel
target should build the kernel and modules on all architectures
anyways.

Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
---
 rteval/modules/loads/kcompile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 326f1ae..e747b9f 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -58,7 +58,7 @@ class KBuildJob:
         else:
             self.jobs = self.calc_jobs_per_cpu() * len(self.node)
         self.log(Log.DEBUG, "node %d: jobs == %d" % (int(node), self.jobs))
-        self.runcmd = "%s make O=%s -C %s -j%d bzImage modules" \
+        self.runcmd = "%s make O=%s -C %s -j%d" \
                 % (self.binder, self.objdir, self.kdir, self.jobs)
         self.cleancmd = "%s make O=%s -C %s clean allmodconfig" \
                 % (self.binder, self.objdir, self.kdir)
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [rteval PATCH 0/2] Relax some architecture specific constraints
  2021-01-26  2:12 [rteval PATCH 0/2] Relax some architecture specific constraints Punit Agrawal
  2021-01-26  2:12 ` [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional Punit Agrawal
  2021-01-26  2:12 ` [rteval PATCH 2/2] rteval: cyclictest.py: Make build targets architecture independent Punit Agrawal
@ 2021-02-22  0:31 ` Punit Agrawal
  2 siblings, 0 replies; 7+ messages in thread
From: Punit Agrawal @ 2021-02-22  0:31 UTC (permalink / raw)
  To: John Kacur
  Cc: dwagner, Ahmed S . Darwish, linux-rt-users, binh1.tranhai,
	Daniel Sangorrin

Punit Agrawal <punit1.agrawal@toshiba.co.jp> writes:

> Hi,
>
> Here are a couple of patches that enable running rteval on arm64
> targets. A previous version was sent at [0].
>
> The first patch removes the requirement for having a "model name" in
> /proc/cpuinfo. This isn't provided on an arm64 kernel unless running
> in "compat" mode.
>
> The second patch uses the default kernel compilation target instead of
> "bzImage" and "modules". "bzImage" isn't used on arm64. Instead of
> building knowledge of architecture-specific targets it maybe better to
> build the default. The default should build the kernel and modules
> anyways.
>
> More details in the patch commit log.
>
> Feedback welcome.
>
> Thanks,
> Punit
>
> [0] https://lore.kernel.org/linux-rt-users/877doa1uwx.fsf@kokedama.swc.toshiba.co.jp/
>
> Punit Agrawal (2):
>   rteval: cyclictest.py: Make 'model name' optional
>   rteval: cyclictest.py: Make build targets architecture independent
>
>  rteval/modules/loads/kcompile.py         | 2 +-
>  rteval/modules/measurement/cyclictest.py | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

Ping!

If there are no comments / issues with the patches, it would be
great if they can be merged.

Thanks,
Punit

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional
  2021-01-26  2:12 ` [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional Punit Agrawal
@ 2021-02-22 20:16   ` John Kacur
  2021-02-24  1:49     ` Punit Agrawal
  0 siblings, 1 reply; 7+ messages in thread
From: John Kacur @ 2021-02-22 20:16 UTC (permalink / raw)
  To: Punit Agrawal
  Cc: dwagner, Ahmed S . Darwish, linux-rt-users, binh1.tranhai,
	Daniel Sangorrin



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@toshiba.co.jp>
> ---
>  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?

Thanks

John

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [rteval PATCH 2/2] rteval: cyclictest.py: Make build targets architecture independent
  2021-01-26  2:12 ` [rteval PATCH 2/2] rteval: cyclictest.py: Make build targets architecture independent Punit Agrawal
@ 2021-02-22 20:18   ` John Kacur
  0 siblings, 0 replies; 7+ messages in thread
From: John Kacur @ 2021-02-22 20:18 UTC (permalink / raw)
  To: Punit Agrawal
  Cc: dwagner, Ahmed S . Darwish, linux-rt-users, binh1.tranhai,
	Daniel Sangorrin



On Tue, 26 Jan 2021, Punit Agrawal wrote:

> Not all kernel archiectures provide the "bzImage" target, e.g., arm64
> provides "Image" which generates an uncompressed kernel binary.
> 
> Instead of going down the path of customizing build targets
> per-architecture, let's drop them altogether. The default kernel
> target should build the kernel and modules on all architectures
> anyways.
> 
> Signed-off-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
> ---
>  rteval/modules/loads/kcompile.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
> index 326f1ae..e747b9f 100644
> --- a/rteval/modules/loads/kcompile.py
> +++ b/rteval/modules/loads/kcompile.py
> @@ -58,7 +58,7 @@ class KBuildJob:
>          else:
>              self.jobs = self.calc_jobs_per_cpu() * len(self.node)
>          self.log(Log.DEBUG, "node %d: jobs == %d" % (int(node), self.jobs))
> -        self.runcmd = "%s make O=%s -C %s -j%d bzImage modules" \
> +        self.runcmd = "%s make O=%s -C %s -j%d" \
>                  % (self.binder, self.objdir, self.kdir, self.jobs)
>          self.cleancmd = "%s make O=%s -C %s clean allmodconfig" \
>                  % (self.binder, self.objdir, self.kdir)
> -- 
> 2.29.2
> 
> 

Haven't forgotten this, just need to test before I accept it, on my list 
to do.

John

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional
  2021-02-22 20:16   ` John Kacur
@ 2021-02-24  1:49     ` Punit Agrawal
  0 siblings, 0 replies; 7+ messages in thread
From: Punit Agrawal @ 2021-02-24  1:49 UTC (permalink / raw)
  To: John Kacur
  Cc: dwagner, Ahmed S . Darwish, linux-rt-users, binh1.tranhai,
	Daniel Sangorrin

John Kacur <jkacur@redhat.com> 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@toshiba.co.jp>
>> ---
>>  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.

[...]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-24  1:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26  2:12 [rteval PATCH 0/2] Relax some architecture specific constraints Punit Agrawal
2021-01-26  2:12 ` [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional Punit Agrawal
2021-02-22 20:16   ` John Kacur
2021-02-24  1:49     ` Punit Agrawal
2021-01-26  2:12 ` [rteval PATCH 2/2] rteval: cyclictest.py: Make build targets architecture independent Punit Agrawal
2021-02-22 20:18   ` John Kacur
2021-02-22  0:31 ` [rteval PATCH 0/2] Relax some architecture specific constraints Punit Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).