lkml.org 
[lkml]   [2014]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 10/10] scsi/trace: Use scsi_print_command trace point instead of printk
On 08/28/2014 08:19 AM, Yoshihiro YUNOMAE wrote:
> Hi Hannes,
>
> I tried to remove duplicated decoder of SCSI command, but the
> output format of it in constants.c is different from it in traceevents.
> I have two questions for it.
>
> (Ex1)
> traceevents: TEST_UNIT_READY
> constants: Test Unit Ready
>
> => Which of "XXX_YYY_ZZZ" and "Xxx Yyy Zzz" should the kernel output
> strings? This difference comes from difference of implementation.
> The decoder in traceevents are using macro. So, it cannot define
> separated words. On the other hand, the decoder in constants are using
> constant string array table. So, it can define separated words.
>
I would go with the wording in constants.c, but set in double quotes
like "Test Unit Ready" to avoid parsing errors later on.

> (Ex2)
> traceevents: (nothing)
> constants: Set limits(12)
>
> => Should we merge those decoder?
>
Yes, I would prefer this. Again, we should be setting the strings in
double quotes irrespective if there are spaces in the resulting
string or not.

> I understand we use the decoder of constants, but we need to solve
> these problems. Would you give me your comments?
>
As mentioned previously, my aim is to convert the logging system in
several steps:

a) convert all lone 'printk' statements into dev_printk() variants
and ensure everything is printed in one statement to avoid
linebreaks in the resulting logging message.
This will eliminate the immediate problem we're having, namely
that debugging is near to impossible under high load.
The patchset is nearing completion, and I will be posting it
later this week.
b) Convert scsi_trace to use the functions from constants.c to
avoid code duplication and update scsi_trace to log sense codes.
c) Remove all logging functions in the hot path (ie
SCSI_LOG_MLQUEUE and SCSI_LOG_MLCOMPLETE) and replace them
with trace events.

b) is what you're working on, right?
For 'c)' the problem is that we should retain the existing
functionality with scsi_logging_level here, at least initially.
So we cannot just replace it, as this would leave SCSI_LOG_ML
a dummy without any real functionality.

I'll be posting my current patchset for review shortly.

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-08-28 14:21    [W:0.148 / U:2.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site