Re: [PATCH 21/22] scsi: reduce messages for command failure

Christoph Hellwig
2014-09-06T00:35:15Z

On Mon, Sep 01, 2014 at 01:14:23AM +0000, Elliott, Robert (Server Storage) wrote:
> Before this patch set, ratelimited printing was impossible because
> there were so many partial-line printk calls. This patch set
> may resolve that problem.
>
> Multiple related lines may still cause problems; if it prints
> CDB, sense key, and additional sense code on three lines, you
> don't want the CDB and sense key suppressed with the additional
> sense code still sneaking out (because command completions
> are concurrent).
>
> If those issues can be overcome, then I'd favor offering ratelimited
> calls. Maybe the logging level could be used to select the amount,
> like:
> 0 = no prints
> 1..n = ratelimited versions of the prints
> n+1..m = not ratelimited versions of the prints

I don't think an unlimited output into the printk buffer is sensible
with the number of IOPS we get from modern devices. If you need
detailed output you should be using the binary trace buffer.