linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joseph Salisbury <Joseph.Salisbury@microsoft.com>
To: Michael Kelley <mikelley@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"sashal@kernel.org" <sashal@kernel.org>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>
Cc: "linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] Drivers: hv: Change flag to write log level in panic msg to false
Date: Fri, 26 Jun 2020 22:25:25 +0000	[thread overview]
Message-ID: <MN2PR21MB1453750B4B63CDF190F393399C930@MN2PR21MB1453.namprd21.prod.outlook.com> (raw)
In-Reply-To: <MW2PR2101MB1052837695100EF9B4BC9874D7930@MW2PR2101MB1052.namprd21.prod.outlook.com>



-----Original Message-----
From: Michael Kelley <mikelley@microsoft.com> 
Sent: Friday, June 26, 2020 6:24 PM
To: Joseph Salisbury <Joseph.Salisbury@microsoft.com>; KY Srinivasan <kys@microsoft.com>; Haiyang Zhang <haiyangz@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>; sashal@kernel.org; wei.liu@kernel.org
Cc: linux-hyperv@vger.kernel.org; linux-kernel@vger.kernel.org; stable@vger.kernel.org
Subject: RE: [PATCH] Drivers: hv: Change flag to write log level in panic msg to false

From: Joseph Salisbury <Joseph.Salisbury@microsoft.com>  Sent: Friday, June 26, 2020 3:16 PM
> 
> Thanks for the feedback, Michael.  I'll send a v2.
> 
> Thanks,
> 
> Joe

A quick note:  The style on the Linux kernel mailing lists is to always reply inline, after the text you are replying to.  This is quite different from the style usually used inside Microsoft, which is called "top posting".

Michael

ACK, thanks!

Joe

> 
> 
> -----Original Message-----
> From: Michael Kelley <mikelley@microsoft.com>
> Sent: Friday, June 26, 2020 4:53 PM
> To: Joseph Salisbury <Joseph.Salisbury@microsoft.com>; KY Srinivasan 
> <kys@microsoft.com>; Haiyang Zhang <haiyangz@microsoft.com>; Stephen 
> Hemminger <sthemmin@microsoft.com>; sashal@kernel.org; 
> wei.liu@kernel.org
> Cc: linux-hyperv@vger.kernel.org; linux-kernel@vger.kernel.org; 
> stable@vger.kernel.org
> Subject: RE: [PATCH] Drivers: hv: Change flag to write log level in 
> panic msg to false
> 
> From: Joseph Salisbury <joseph.salisbury@microsoft.com> Sent: Friday, 
> June 26, 2020 10:48 AM
> >
> > When the kernel panics, one page worth of kmsg data is written to an 
> > allocated page.  The Hypervisor is notified of the page address 
> > trough the MSR.  This panic information is collected on the host.  
> > Since we are only collecting one page of data, the full panic message may not be collected.
> >
> > Each line of the panic message is prefixed with the log level of that
> > particular message in the form <N>, where N is the log level.   The typical
> > 4 Kbytes contains anywhere from 50 to 100 lines with that log level prefix.
> >
> > hv_dmsg_dump() makes a call to kmsg_dump_get_buffer().  The second 
> > argument in the call is a bool described as: ‘@syslog: include the “<4>” Prefixes’.
> >
> > With this change, we will not write the log level to the allocated 
> > page.  This will provide additional room in the allocated page for 
> > more informative panic information.
> 
> Let me suggest tightening the commit message a bit, with focus on the "what"
> and "why" rather than the details of the code change.  Also use 
> imperative voice per the Linux kernel guidelines:
> 
> When the kernel panics, one page of kmsg data may be collected and 
> sent to Hyper-V to aid in diagnosing the failure.  The collected kmsg 
> data typically contains 50 to 100 lines, each of which has a log level 
> prefix that isn't very useful from a diagnostic standpoint.  So tell
> kmsg_dump_get_buffer() to not include the log level, enabling more 
> information that *is* useful to fit in the page.
> 
> >
> > Requesting in stable kernels, since many kernels running in 
> > production are stable releases.
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Joseph Salisbury <joseph.salisbury@microsoft.com>
> > ---
> >  drivers/hv/vmbus_drv.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index
> > 9147ee9d5f7d..d69f4efa3719 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -1368,7 +1368,7 @@ static void hv_kmsg_dump(struct kmsg_dumper *dumper,
> >  	 * Write dump contents to the page. No need to synchronize; panic should
> >  	 * be single-threaded.
> >  	 */
> > -	kmsg_dump_get_buffer(dumper, true, hv_panic_page, HV_HYP_PAGE_SIZE,
> > +	kmsg_dump_get_buffer(dumper, false, hv_panic_page, 
> > +HV_HYP_PAGE_SIZE,
> >  			     &bytes_written);
> >  	if (bytes_written)
> >  		hyperv_report_panic_msg(panic_pa, bytes_written);
> > --
> > 2.17.1
> 
> With the commit message changes,
> 
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>

  reply	other threads:[~2020-06-26 22:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 17:48 [PATCH] Drivers: hv: Change flag to write log level in panic msg to false Joseph Salisbury
2020-06-26 20:53 ` Michael Kelley
2020-06-26 22:15   ` Joseph Salisbury
2020-06-26 22:23     ` Michael Kelley
2020-06-26 22:25       ` Joseph Salisbury [this message]
2020-07-01 19:33 ` Sasha Levin
2020-07-10  9:24 ` Olaf Hering
2020-07-10 10:10   ` Michael Kelley

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=MN2PR21MB1453750B4B63CDF190F393399C930@MN2PR21MB1453.namprd21.prod.outlook.com \
    --to=joseph.salisbury@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@kernel.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).