RE: [PATCH RESEND] scsi: Output error messages using structured printk in single line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: linux-scsi-owner@xxxxxxxxxxxxxxx [mailto:linux-scsi-
> owner@xxxxxxxxxxxxxxx] On Behalf Of James Bottomley
> Sent: Tuesday, May 20, 2014 9:22 PM
> To: Yoshihiro YUNOMAE
> Cc: Hannes Reinecke; Prarit Bhargava; linux-scsi@xxxxxxxxxxxxxxx; Kay
> Sievers; linux-kernel@xxxxxxxxxxxxxxx; Hidehiro Kawai; yrl.pp-
> manager.tt@xxxxxxxxxxx; Masami Hiramatsu
> Subject: Re: [PATCH RESEND] scsi: Output error messages using structured
> printk in single line
> 
> On Thu, 2014-02-27 at 13:17 +0900, Yoshihiro YUNOMAE wrote:
> > +/* Maximum size of a local buffer for structured printk */
> > +#define SCSI_LOG_LINE_MAX 512
> > +
> > +/* Local buffer for structured printk */
> > +struct scsi_log_line {
> > +	int offset;
> > +	char buf[SCSI_LOG_LINE_MAX];
> > +};
> 
> This piece isn't going to fly; it's an on stack allocation of 0.5kb;
> that's too much for small stack kernels.  Just changing this to a kalloc
> is going be problematic too because we're in the io paths and the
> allocation may fail.  So I appreciate the problem, but I don't think the
> solution works.  Could we just tag the messages and use grep to put them
> back together?
> 
> James
> 

When the system gets busy, I've seen CDB bytes strung out with each
byte getting its own timestamp, with messages from different devices
and threads interleaved together, so like the idea of printing each 
line with a single printk() call.

Most lines aren't anywhere near 512 bytes long.  Can this be coded to 
let the calling function define an appropriate buffer size for
whatever it is printing, with sizeof() used to bounds check?


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux