* Another libata TODO item
@ 2005-08-24 6:17 Jeff Garzik
2005-08-24 7:41 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2005-08-24 6:17 UTC (permalink / raw)
To: linux-ide@vger.kernel.org; +Cc: Linux Kernel
Difficulty: beginner / intermediate
Modern network drivers have a per-NIC list of debugging messages that
can be enabled/disabled at runtime, implemented as a bitmask named
'msg_enable' in each driver. VERY useful for tracing specific events
during debugging. grep for 'msg_enable', 'netif_msg_', and 'NETIF_MSG_'.
To make libata debugging easier and more fine-grained, we should convert
DPRINTK/VPRINTK calls in libata to code that looks like
if (ata_msg_xxx(ap->msg_enable))
printk(...)
The task involves:
* reviewing net driver msg_enable usage
* reviewing original netif_msg documentation by Donald Becker, at
(scroll down)
http://www.scyld.com/pipermail/vortex/2001-November/001426.html
* designing a sliding scale of ever-more-verbose classes of messages,
for libata and libata drivers
* design a method by which userspace may change the per-port msg_enable
variable in libata
* implement the sliding scale as ATA_MSG_xxx / ata_msg_xxx()
* add msg_enable to struct ata_port
* implement method of setting ap->msg_enable via userspace
* convert messages in libata-core/libata-scsi
* convert messages in each driver
* add 'debug' module option to each driver, in a manner that duplicates
net driver module options
* test!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Another libata TODO item
2005-08-24 6:17 Another libata TODO item Jeff Garzik
@ 2005-08-24 7:41 ` Christoph Hellwig
2005-08-24 7:51 ` Jeff Garzik
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2005-08-24 7:41 UTC (permalink / raw)
To: linux-ide@vger.kernel.org; +Cc: Linux Kernel
On Wed, Aug 24, 2005 at 02:17:11AM -0400, Jeff Garzik wrote:
>
> Difficulty: beginner / intermediate
>
> Modern network drivers have a per-NIC list of debugging messages that
> can be enabled/disabled at runtime, implemented as a bitmask named
> 'msg_enable' in each driver. VERY useful for tracing specific events
> during debugging. grep for 'msg_enable', 'netif_msg_', and 'NETIF_MSG_'.
>
> To make libata debugging easier and more fine-grained, we should convert
> DPRINTK/VPRINTK calls in libata to code that looks like
>
> if (ata_msg_xxx(ap->msg_enable))
> printk(...)
Would be nice if you could move that one up to the scsi layer and combine
it with the existing scsi core loglevel handling.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Another libata TODO item
2005-08-24 7:41 ` Christoph Hellwig
@ 2005-08-24 7:51 ` Jeff Garzik
2005-08-24 16:15 ` Roland Dreier
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2005-08-24 7:51 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-ide@vger.kernel.org, Linux Kernel
Christoph Hellwig wrote:
> On Wed, Aug 24, 2005 at 02:17:11AM -0400, Jeff Garzik wrote:
>>To make libata debugging easier and more fine-grained, we should convert
>>DPRINTK/VPRINTK calls in libata to code that looks like
>>
>> if (ata_msg_xxx(ap->msg_enable))
>> printk(...)
>
>
> Would be nice if you could move that one up to the scsi layer and combine
> it with the existing scsi core loglevel handling.
Doubtful. libata's use of SCSI will become optional, so using SCSI
logging throughout libata core would be inappropriate. Block layer
would be more reasonable.
In any case, I also contine to be skeptical of in-kernel logging subsystems.
Jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Another libata TODO item
2005-08-24 7:51 ` Jeff Garzik
@ 2005-08-24 16:15 ` Roland Dreier
2005-08-24 16:53 ` Jeff Garzik
0 siblings, 1 reply; 7+ messages in thread
From: Roland Dreier @ 2005-08-24 16:15 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Christoph Hellwig, linux-ide@vger.kernel.org, Linux Kernel
Jeff> In any case, I also contine to be skeptical of in-kernel
Jeff> logging subsystems.
Aren't you proposing a libata logging subsystem?
- R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Another libata TODO item
2005-08-24 16:15 ` Roland Dreier
@ 2005-08-24 16:53 ` Jeff Garzik
2005-08-24 17:19 ` Roland Dreier
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2005-08-24 16:53 UTC (permalink / raw)
To: Roland Dreier; +Cc: Christoph Hellwig, linux-ide@vger.kernel.org, Linux Kernel
Roland Dreier wrote:
> Jeff> In any case, I also contine to be skeptical of in-kernel
> Jeff> logging subsystems.
>
> Aren't you proposing a libata logging subsystem?
Look at net drivers. Theres no real infrastructure beyond bit tests and
printks. I wouldn't call that a subsystem, so, I wouldn't call this one
such either.
Jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Another libata TODO item
2005-08-24 16:53 ` Jeff Garzik
@ 2005-08-24 17:19 ` Roland Dreier
2005-08-24 17:24 ` Jeff Garzik
0 siblings, 1 reply; 7+ messages in thread
From: Roland Dreier @ 2005-08-24 17:19 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Christoph Hellwig, linux-ide@vger.kernel.org, Linux Kernel
Jeff> Look at net drivers. Theres no real infrastructure beyond
Jeff> bit tests and printks. I wouldn't call that a subsystem,
Jeff> so, I wouldn't call this one such either.
Well, scsi_logging.h isn't much of a subsystem either.
- R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Another libata TODO item
2005-08-24 17:19 ` Roland Dreier
@ 2005-08-24 17:24 ` Jeff Garzik
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2005-08-24 17:24 UTC (permalink / raw)
To: Roland Dreier; +Cc: Christoph Hellwig, linux-ide@vger.kernel.org, Linux Kernel
Roland Dreier wrote:
> Jeff> Look at net drivers. Theres no real infrastructure beyond
> Jeff> bit tests and printks. I wouldn't call that a subsystem,
> Jeff> so, I wouldn't call this one such either.
>
> Well, scsi_logging.h isn't much of a subsystem either.
You obviously did not grep for CONFIG_SCSI_LOGGING :)
Jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-08-24 17:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-24 6:17 Another libata TODO item Jeff Garzik
2005-08-24 7:41 ` Christoph Hellwig
2005-08-24 7:51 ` Jeff Garzik
2005-08-24 16:15 ` Roland Dreier
2005-08-24 16:53 ` Jeff Garzik
2005-08-24 17:19 ` Roland Dreier
2005-08-24 17:24 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox