[libvirt] [PATCH 1/3] util: virhostcpu: parse frequency information on S390

Bjoern Walk posted 3 patches 7 years, 4 months ago
There is a newer version of this series
[libvirt] [PATCH 1/3] util: virhostcpu: parse frequency information on S390
Posted by Bjoern Walk 7 years, 4 months ago
Since kernel version 4.7, processor frequency information is available
on S390. Let's adjust the parser so this information shows up for virsh
nodeinfo:

    # virsh nodeinfo
    CPU model:           s390x
    CPU(s):              8
    CPU frequency:       5000 MHz
    CPU socket(s):       1
    Core(s) per socket:  8
    Thread(s) per core:  1
    NUMA cell(s):        1
    Memory size:         16273908 KiB

Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
---
 src/util/virhostcpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 1c9ee592..24f0d936 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -598,6 +598,8 @@ virHostCPUParseFrequency(FILE *cpuinfo,
         prefix = "cpu MHz";
     else if (ARCH_IS_PPC(arch))
         prefix = "clock";
+    else if (ARCH_IS_S390(arch))
+        prefix = "cpu MHz dynamic";
 
     if (!prefix) {
         VIR_WARN("%s is not supported by the %s parser",
-- 
2.13.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/3] util: virhostcpu: parse frequency information on S390
Posted by John Ferlan 7 years, 4 months ago

On 12/19/2017 05:08 AM, Bjoern Walk wrote:
> Since kernel version 4.7, processor frequency information is available
> on S390. Let's adjust the parser so this information shows up for virsh
> nodeinfo:
> 
>     # virsh nodeinfo
>     CPU model:           s390x
>     CPU(s):              8
>     CPU frequency:       5000 MHz
>     CPU socket(s):       1
>     Core(s) per socket:  8
>     Thread(s) per core:  1
>     NUMA cell(s):        1
>     Memory size:         16273908 KiB
> 
> Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
> Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
> ---
>  src/util/virhostcpu.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

This one doesn't apply for me... seems we're missing something like
virHostCPUParseFrequency. Probably makes the next one moot too.
Although they both look reasonable even though I know nothing about S390
(other than perhaps one spelling variation ;-)).

John

> diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
> index 1c9ee592..24f0d936 100644
> --- a/src/util/virhostcpu.c
> +++ b/src/util/virhostcpu.c
> @@ -598,6 +598,8 @@ virHostCPUParseFrequency(FILE *cpuinfo,
>          prefix = "cpu MHz";
>      else if (ARCH_IS_PPC(arch))
>          prefix = "clock";
> +    else if (ARCH_IS_S390(arch))
> +        prefix = "cpu MHz dynamic";
>  
>      if (!prefix) {
>          VIR_WARN("%s is not supported by the %s parser",
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/3] util: virhostcpu: parse frequency information on S390
Posted by John Ferlan 7 years, 4 months ago

On 01/04/2018 03:56 PM, John Ferlan wrote:
> 
> 
> On 12/19/2017 05:08 AM, Bjoern Walk wrote:
>> Since kernel version 4.7, processor frequency information is available
>> on S390. Let's adjust the parser so this information shows up for virsh
>> nodeinfo:
>>
>>     # virsh nodeinfo
>>     CPU model:           s390x
>>     CPU(s):              8
>>     CPU frequency:       5000 MHz
>>     CPU socket(s):       1
>>     Core(s) per socket:  8
>>     Thread(s) per core:  1
>>     NUMA cell(s):        1
>>     Memory size:         16273908 KiB
>>
>> Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
>> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
>> Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
>> ---
>>  src/util/virhostcpu.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
> 
> This one doesn't apply for me... seems we're missing something like
> virHostCPUParseFrequency. Probably makes the next one moot too.
> Although they both look reasonable even though I know nothing about S390
> (other than perhaps one spelling variation ;-)).
> 
> John
> 

Doh - should have read the cover letter <facepalm> - this goes on top of
Andrea's changes...  Sometimes it's just better to wait and/or provide
review to the series you trying to use!

John

>> diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
>> index 1c9ee592..24f0d936 100644
>> --- a/src/util/virhostcpu.c
>> +++ b/src/util/virhostcpu.c
>> @@ -598,6 +598,8 @@ virHostCPUParseFrequency(FILE *cpuinfo,
>>          prefix = "cpu MHz";
>>      else if (ARCH_IS_PPC(arch))
>>          prefix = "clock";
>> +    else if (ARCH_IS_S390(arch))
>> +        prefix = "cpu MHz dynamic";
>>  
>>      if (!prefix) {
>>          VIR_WARN("%s is not supported by the %s parser",
>>
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/3] util: virhostcpu: parse frequency information on S390
Posted by Bjoern Walk 7 years, 4 months ago
John Ferlan <jferlan@redhat.com> [2018-01-05, 03:13PM -0500]:
> Doh - should have read the cover letter <facepalm> - this goes on top of
> Andrea's changes...  Sometimes it's just better to wait and/or provide
> review to the series you trying to use!
> 

Ye, sorry, should have made it more clear or reply-attached it to
Andrea's series. I basically sent it out last year so I won't forget
now.

> John
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/3] util: virhostcpu: parse frequency information on S390
Posted by John Ferlan 7 years, 4 months ago

On 12/19/2017 05:08 AM, Bjoern Walk wrote:
> Since kernel version 4.7, processor frequency information is available
> on S390. Let's adjust the parser so this information shows up for virsh
> nodeinfo:
> 
>     # virsh nodeinfo
>     CPU model:           s390x
>     CPU(s):              8
>     CPU frequency:       5000 MHz
>     CPU socket(s):       1
>     Core(s) per socket:  8
>     Thread(s) per core:  1
>     NUMA cell(s):        1
>     Memory size:         16273908 KiB
> 
> Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
> Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
> ---
>  src/util/virhostcpu.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

OK - once Andrea has pushed...  Consider this,

Reviewed-by: John Ferlan <jferlan@redhat.com>

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/3] util: virhostcpu: parse frequency information on S390
Posted by Bjoern Walk 7 years, 4 months ago
John Ferlan <jferlan@redhat.com> [2018-01-05, 03:53PM -0500]:
> 
> 
> On 12/19/2017 05:08 AM, Bjoern Walk wrote:
> > Since kernel version 4.7, processor frequency information is available
> > on S390. Let's adjust the parser so this information shows up for virsh
> > nodeinfo:
> > 
> >     # virsh nodeinfo
> >     CPU model:           s390x
> >     CPU(s):              8
> >     CPU frequency:       5000 MHz
> >     CPU socket(s):       1
> >     Core(s) per socket:  8
> >     Thread(s) per core:  1
> >     NUMA cell(s):        1
> >     Memory size:         16273908 KiB
> > 
> > Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
> > Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
> > Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
> > ---
> >  src/util/virhostcpu.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> 
> OK - once Andrea has pushed...  Consider this,
> 
> Reviewed-by: John Ferlan <jferlan@redhat.com>
> 
> John
> 

Thanks.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list