linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
	linuxppc-dev <linuxppc-dev@ozlabs.org>
Cc: Paul Mackerras <paulus@samba.org>, Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [RFC PATCH 1/3] powernv/mce: reduce mce console logs to lesser lines.
Date: Fri, 29 Mar 2019 15:53:24 +0530	[thread overview]
Message-ID: <cdfb484e-0468-edb3-3d8f-306c50ddceca@linux.vnet.ibm.com> (raw)
In-Reply-To: <87bm1uo7iw.fsf@concordia.ellerman.id.au>

On 3/29/19 5:50 AM, Michael Ellerman wrote:
> Hi Mahesh,
> 
> Thanks for doing this series.
> 
> Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> writes:
>> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>>
>> Also add cpu number while displaying mce log. This will help cleaner logs
>> when mce hits on multiple cpus simultaneously.
> 
> Can you include some examples of the output before and after, so it's
> easier to compare what the changes are.

Sure will add that in next revision.

> 
> I think you have an example in patch 3, but it would be good to have it here.
> 
>> diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
>> index b5fec1f9751a..44614462cb34 100644
>> --- a/arch/powerpc/kernel/mce.c
>> +++ b/arch/powerpc/kernel/mce.c
>> @@ -384,101 +387,100 @@ void machine_check_print_event_info(struct machine_check_event *evt,
>>  		break;
>>  	}
>>  
>> -	printk("%s%s Machine check interrupt [%s]\n", level, sevstr,
> 
> I think I'd still like the first line at least to include "machine
> check" somewhere, I'm not sure everyone will understand what "MCE" means.

I reduced it to MCE so that I can pack in more stuff in 80 columns. But
you are right, let me see.

> 
> ...
>> +
>> +	if (ea && evt->srr0 != ea)
>> +		sprintf(dar_str, "DAR: %016llx ", ea);
>> +	else
>> +		memset(dar_str, 0, sizeof(dar_str));
> 
> Just dar_str[0] = '\0' would work wouldn't it?

Yeah, that also should be enough.

> 
>> +	if (in_guest || user_mode) {
>> +		printk("%sMCE: CPU%d: (%s) %s %s %s at %016llx %s[%s]\n",
>> +			level, evt->cpu, sevstr,
>> +			in_guest ? "Guest" : "Host",
>> +			err_type, subtype, evt->srr0, dar_str,
>> +			evt->disposition == MCE_DISPOSITION_RECOVERED ?
>> +			"Recovered" : "Not recovered");
>> +		printk("%sMCE: CPU%d: PID: %d Comm: %s\n",
>> +			level, evt->cpu, current->pid, current->comm);
>> +	} else {
>> +		printk("%sMCE: CPU%d: (%s) Host %s %s at %016llx %s[%s]\n",
>> +			level, evt->cpu, sevstr, err_type, subtype, evt->srr0,
>> +			dar_str,
>> +			evt->disposition == MCE_DISPOSITION_RECOVERED ?
>> +			"Recovered" : "Not recovered");
>> +		printk("%sMCE: CPU%d: NIP: [%016llx] %pS\n",
>> +			level, evt->cpu, evt->srr0, (void *)evt->srr0);
>> +	}
> 
> The first printf in the two cases is quite similar, seems like they
> could be consolidated.
> 
> I also think it'd be clearer to print the NIP on the 2nd line in all
> cases, rather than the first.

Sure, and I will then put "machine check" on 1st line like below ?

printk("%sMCE: CPU%d: machine check (%s) %s %s %s %s[%s]\n",


> 
> What about (untested) ?
> 
>   printk("%sMCE: CPU%d: (%s) %s %s %s %s[%s]\n",
> 	 level, evt->cpu, sevstr,
> 	 in_guest ? "Guest" : "Host",
> 	 err_type, subtype, dar_str,
> 	 evt->disposition == MCE_DISPOSITION_RECOVERED ?
> 	 "Recovered" : "Not recovered");
>   
>   if (in_guest || user_mode) {
> 	printk("%sMCE: CPU%d: PID: %d Comm: %s %sNIP: [%016llx]\n",
> 	       level, evt->cpu, current->pid, current->comm,
> 	       in_guest ? "Guest " : "", evt->srr0);
>   } else {
> 	printk("%sMCE: CPU%d: NIP: [%016llx] %pS\n",
> 		level, evt->cpu, evt->srr0, (void *)evt->srr0);
>   }

Sure, will make these changes.

Thanks,
-Mahesh.


  reply	other threads:[~2019-03-29 10:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  9:36 [RFC PATCH 1/3] powernv/mce: reduce mce console logs to lesser lines Mahesh J Salgaonkar
2019-03-22  9:36 ` [RFC PATCH 2/3] powernv/mce: Print correct severity for mce error Mahesh J Salgaonkar
2019-03-29  0:23   ` Michael Ellerman
2019-03-29 10:24     ` Mahesh Jagannath Salgaonkar
2019-03-22  9:36 ` [RFC PATCH 3/3] powenv/mce: print additional information about " Mahesh J Salgaonkar
2019-03-29  1:31   ` Michael Ellerman
2019-03-29  0:20 ` [RFC PATCH 1/3] powernv/mce: reduce mce console logs to lesser lines Michael Ellerman
2019-03-29 10:23   ` Mahesh Jagannath Salgaonkar [this message]
2019-03-31  9:55     ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cdfb484e-0468-edb3-3d8f-306c50ddceca@linux.vnet.ibm.com \
    --to=mahesh@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).