diff mbox

[2/2] KVM: s390: diagnoses are instructions as well

Message ID 20180124113235.31485-3-borntraeger@de.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Christian Borntraeger Jan. 24, 2018, 11:32 a.m. UTC
make the diagnose counters also appear as instruction counters.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/kvm/kvm-s390.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Janosch Frank Jan. 24, 2018, 12:41 p.m. UTC | #1
On 24.01.2018 12:32, Christian Borntraeger wrote:
> make the diagnose counters also appear as instruction counters.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>

I always liked having them in an own category, as they are somewhat
special, but the instruction prefix only makes them slightly harder to
find, so I'm fine with it. :)

Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>

> ---
>  arch/s390/kvm/kvm-s390.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 3abe177..1f30087 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -132,12 +132,12 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
>  	{ "instruction_sigp_cpu_reset", VCPU_STAT(instruction_sigp_cpu_reset) },
>  	{ "instruction_sigp_init_cpu_reset", VCPU_STAT(instruction_sigp_init_cpu_reset) },
>  	{ "instruction_sigp_unknown", VCPU_STAT(instruction_sigp_unknown) },
> -	{ "diagnose_10", VCPU_STAT(diagnose_10) },
> -	{ "diagnose_44", VCPU_STAT(diagnose_44) },
> -	{ "diagnose_9c", VCPU_STAT(diagnose_9c) },
> -	{ "diagnose_258", VCPU_STAT(diagnose_258) },
> -	{ "diagnose_308", VCPU_STAT(diagnose_308) },
> -	{ "diagnose_500", VCPU_STAT(diagnose_500) },
> +	{ "instruction_diag_10", VCPU_STAT(diagnose_10) },
> +	{ "instruction_diag_44", VCPU_STAT(diagnose_44) },
> +	{ "instruction_diag_9c", VCPU_STAT(diagnose_9c) },
> +	{ "instruction_diag_258", VCPU_STAT(diagnose_258) },
> +	{ "instruction_diag_308", VCPU_STAT(diagnose_308) },
> +	{ "instruction_diag_500", VCPU_STAT(diagnose_500) },
>  	{ NULL }
>  };
>
David Hildenbrand Jan. 24, 2018, 12:42 p.m. UTC | #2
On 24.01.2018 12:32, Christian Borntraeger wrote:
> make the diagnose counters also appear as instruction counters.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kvm/kvm-s390.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 3abe177..1f30087 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -132,12 +132,12 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
>  	{ "instruction_sigp_cpu_reset", VCPU_STAT(instruction_sigp_cpu_reset) },
>  	{ "instruction_sigp_init_cpu_reset", VCPU_STAT(instruction_sigp_init_cpu_reset) },
>  	{ "instruction_sigp_unknown", VCPU_STAT(instruction_sigp_unknown) },
> -	{ "diagnose_10", VCPU_STAT(diagnose_10) },
> -	{ "diagnose_44", VCPU_STAT(diagnose_44) },
> -	{ "diagnose_9c", VCPU_STAT(diagnose_9c) },
> -	{ "diagnose_258", VCPU_STAT(diagnose_258) },
> -	{ "diagnose_308", VCPU_STAT(diagnose_308) },
> -	{ "diagnose_500", VCPU_STAT(diagnose_500) },
> +	{ "instruction_diag_10", VCPU_STAT(diagnose_10) },
> +	{ "instruction_diag_44", VCPU_STAT(diagnose_44) },
> +	{ "instruction_diag_9c", VCPU_STAT(diagnose_9c) },
> +	{ "instruction_diag_258", VCPU_STAT(diagnose_258) },
> +	{ "instruction_diag_308", VCPU_STAT(diagnose_308) },
> +	{ "instruction_diag_500", VCPU_STAT(diagnose_500) },
>  	{ NULL }
>  };
>  
> 

I guess we can change as this is no kernel API?

Reviewed-by: David Hildenbrand <david@redhat.com>
Christian Borntraeger Jan. 24, 2018, 12:51 p.m. UTC | #3
On 01/24/2018 01:42 PM, David Hildenbrand wrote:
> On 24.01.2018 12:32, Christian Borntraeger wrote:
>> make the diagnose counters also appear as instruction counters.
>>
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> ---
>>  arch/s390/kvm/kvm-s390.c | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>> index 3abe177..1f30087 100644
>> --- a/arch/s390/kvm/kvm-s390.c
>> +++ b/arch/s390/kvm/kvm-s390.c
>> @@ -132,12 +132,12 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
>>  	{ "instruction_sigp_cpu_reset", VCPU_STAT(instruction_sigp_cpu_reset) },
>>  	{ "instruction_sigp_init_cpu_reset", VCPU_STAT(instruction_sigp_init_cpu_reset) },
>>  	{ "instruction_sigp_unknown", VCPU_STAT(instruction_sigp_unknown) },
>> -	{ "diagnose_10", VCPU_STAT(diagnose_10) },
>> -	{ "diagnose_44", VCPU_STAT(diagnose_44) },
>> -	{ "diagnose_9c", VCPU_STAT(diagnose_9c) },
>> -	{ "diagnose_258", VCPU_STAT(diagnose_258) },
>> -	{ "diagnose_308", VCPU_STAT(diagnose_308) },
>> -	{ "diagnose_500", VCPU_STAT(diagnose_500) },
>> +	{ "instruction_diag_10", VCPU_STAT(diagnose_10) },
>> +	{ "instruction_diag_44", VCPU_STAT(diagnose_44) },
>> +	{ "instruction_diag_9c", VCPU_STAT(diagnose_9c) },
>> +	{ "instruction_diag_258", VCPU_STAT(diagnose_258) },
>> +	{ "instruction_diag_308", VCPU_STAT(diagnose_308) },
>> +	{ "instruction_diag_500", VCPU_STAT(diagnose_500) },
>>  	{ NULL }
>>  };
>>  
>>
> 
> I guess we can change as this is no kernel API?

Dont think so. This contains a lot of implementation detail counts (e.g.
attempted poll).

The only user seems to be kvm_stat, which will continue to work as is.

And Stefan is working on a feature to group instruction_* under
exit_instruction when you press x. With this kernel patch you would
get the same for diagnoses as well so I though that this patch makes
sense.

> 
> Reviewed-by: David Hildenbrand <david@redhat.com>
>
Christian Borntraeger Jan. 24, 2018, 12:54 p.m. UTC | #4
On 01/24/2018 01:51 PM, Christian Borntraeger wrote:
> 
> 
> On 01/24/2018 01:42 PM, David Hildenbrand wrote:
>> On 24.01.2018 12:32, Christian Borntraeger wrote:
>>> make the diagnose counters also appear as instruction counters.
>>>
>>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>>> ---
>>>  arch/s390/kvm/kvm-s390.c | 12 ++++++------
>>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>>> index 3abe177..1f30087 100644
>>> --- a/arch/s390/kvm/kvm-s390.c
>>> +++ b/arch/s390/kvm/kvm-s390.c
>>> @@ -132,12 +132,12 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
>>>  	{ "instruction_sigp_cpu_reset", VCPU_STAT(instruction_sigp_cpu_reset) },
>>>  	{ "instruction_sigp_init_cpu_reset", VCPU_STAT(instruction_sigp_init_cpu_reset) },
>>>  	{ "instruction_sigp_unknown", VCPU_STAT(instruction_sigp_unknown) },
>>> -	{ "diagnose_10", VCPU_STAT(diagnose_10) },
>>> -	{ "diagnose_44", VCPU_STAT(diagnose_44) },
>>> -	{ "diagnose_9c", VCPU_STAT(diagnose_9c) },
>>> -	{ "diagnose_258", VCPU_STAT(diagnose_258) },
>>> -	{ "diagnose_308", VCPU_STAT(diagnose_308) },
>>> -	{ "diagnose_500", VCPU_STAT(diagnose_500) },
>>> +	{ "instruction_diag_10", VCPU_STAT(diagnose_10) },
>>> +	{ "instruction_diag_44", VCPU_STAT(diagnose_44) },
>>> +	{ "instruction_diag_9c", VCPU_STAT(diagnose_9c) },
>>> +	{ "instruction_diag_258", VCPU_STAT(diagnose_258) },
>>> +	{ "instruction_diag_308", VCPU_STAT(diagnose_308) },
>>> +	{ "instruction_diag_500", VCPU_STAT(diagnose_500) },
>>>  	{ NULL }
>>>  };
>>>  
>>>
>>
>> I guess we can change as this is no kernel API?
> 
> Dont think so. This contains a lot of implementation detail counts (e.g.
> attempted poll).

To rephrase. I do not think its kernel API.
Cornelia Huck Jan. 24, 2018, 2:51 p.m. UTC | #5
On Wed, 24 Jan 2018 12:32:35 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> make the diagnose counters also appear as instruction counters.

s/make/Make/

> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kvm/kvm-s390.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 3abe177..1f30087 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -132,12 +132,12 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
>  	{ "instruction_sigp_cpu_reset", VCPU_STAT(instruction_sigp_cpu_reset) },
>  	{ "instruction_sigp_init_cpu_reset", VCPU_STAT(instruction_sigp_init_cpu_reset) },
>  	{ "instruction_sigp_unknown", VCPU_STAT(instruction_sigp_unknown) },
> -	{ "diagnose_10", VCPU_STAT(diagnose_10) },
> -	{ "diagnose_44", VCPU_STAT(diagnose_44) },
> -	{ "diagnose_9c", VCPU_STAT(diagnose_9c) },
> -	{ "diagnose_258", VCPU_STAT(diagnose_258) },
> -	{ "diagnose_308", VCPU_STAT(diagnose_308) },
> -	{ "diagnose_500", VCPU_STAT(diagnose_500) },
> +	{ "instruction_diag_10", VCPU_STAT(diagnose_10) },
> +	{ "instruction_diag_44", VCPU_STAT(diagnose_44) },
> +	{ "instruction_diag_9c", VCPU_STAT(diagnose_9c) },
> +	{ "instruction_diag_258", VCPU_STAT(diagnose_258) },
> +	{ "instruction_diag_308", VCPU_STAT(diagnose_308) },
> +	{ "instruction_diag_500", VCPU_STAT(diagnose_500) },
>  	{ NULL }
>  };
>  

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
diff mbox

Patch

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 3abe177..1f30087 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -132,12 +132,12 @@  struct kvm_stats_debugfs_item debugfs_entries[] = {
 	{ "instruction_sigp_cpu_reset", VCPU_STAT(instruction_sigp_cpu_reset) },
 	{ "instruction_sigp_init_cpu_reset", VCPU_STAT(instruction_sigp_init_cpu_reset) },
 	{ "instruction_sigp_unknown", VCPU_STAT(instruction_sigp_unknown) },
-	{ "diagnose_10", VCPU_STAT(diagnose_10) },
-	{ "diagnose_44", VCPU_STAT(diagnose_44) },
-	{ "diagnose_9c", VCPU_STAT(diagnose_9c) },
-	{ "diagnose_258", VCPU_STAT(diagnose_258) },
-	{ "diagnose_308", VCPU_STAT(diagnose_308) },
-	{ "diagnose_500", VCPU_STAT(diagnose_500) },
+	{ "instruction_diag_10", VCPU_STAT(diagnose_10) },
+	{ "instruction_diag_44", VCPU_STAT(diagnose_44) },
+	{ "instruction_diag_9c", VCPU_STAT(diagnose_9c) },
+	{ "instruction_diag_258", VCPU_STAT(diagnose_258) },
+	{ "instruction_diag_308", VCPU_STAT(diagnose_308) },
+	{ "instruction_diag_500", VCPU_STAT(diagnose_500) },
 	{ NULL }
 };