Re: [PATCH v2 13/51] IB/qib: Add qib_driver.c

2010-04-07 Thread John A. Gregor
Roland Dreier wrote: > > Where can I find information on trace events? Something in > Documentation/*? > > Yep, Documentation/trace/events.txt. LWN just did a really good writeup on using the TRACE_EVENT macro: http://lwn.net/Articles/379903/ Part 2 is still behind the paywall. -Joh

Re: [PATCH v2 13/51] IB/qib: Add qib_driver.c

2010-04-07 Thread Roland Dreier
> Where can I find information on trace events? Something in Documentation/*? Yep, Documentation/trace/events.txt. Also look at eg include/trace/events/ext4.h and how the trace_ext4_{xxx} functions are used in fs/ext4/*. It's much better than anything you're going to hack up for a single drive

Re: [PATCH v2 13/51] IB/qib: Add qib_driver.c

2010-04-07 Thread Steve Wise
Roland Dreier wrote: > +unsigned qib_debug; > +module_param_named(debug, qib_debug, uint, S_IWUSR | S_IRUGO); > +MODULE_PARM_DESC(debug, "mask for debug prints"); Did you look at using trace events for this stuff? That gives you extremely low overhead when tracing is turned off (dynamic patc

Re: [PATCH v2 13/51] IB/qib: Add qib_driver.c

2010-04-07 Thread Roland Dreier
> +DEFINE_MUTEX(qib_mutex);/* general driver use */ Rather than having this ill-defined mutex that I think is going to make it hard to understand the locking and get the lock ordering right, would it be better to have well-defined locking rules? AFAICT this mutex is used in only two places,

Re: [PATCH v2 13/51] IB/qib: Add qib_driver.c

2010-04-07 Thread Roland Dreier
> +unsigned qib_debug; > +module_param_named(debug, qib_debug, uint, S_IWUSR | S_IRUGO); > +MODULE_PARM_DESC(debug, "mask for debug prints"); Did you look at using trace events for this stuff? That gives you extremely low overhead when tracing is turned off (dynamic patching to NOP out the tra