Re: [PATCH 23/26] dynamic_debug: document pending queries,flags-filter, multiple queries

From: Jason Baron
Date: Mon Oct 10 2011 - 15:27:43 EST


On Mon, Oct 10, 2011 at 12:54:45PM -0600, Jonathan Corbet wrote:
> > +
> > +Queries submitted with 'a' are applied to current callsites as above,
> > +but are also added to a pending list. When a module is loaded later,
> > +pending queries are applied to the module in the order given.
> > +
> > +This is done before the module_init() routine is run, so pr_debug()s
> > +can be active during initialization. To better support module
> > +debugging, pending queries remain on the list through modprobe-rmmod
> > +cycles.
>
> So this functionality seems to be the whole point of much of this patch
> set. That's a lot of stuff to turn on printks during module_init(). I
> can't help but wonder: wouldn't it be easier and better to just recognize
> the ddebug_query= parameter at module load time? Then you could drop this
> whole pending queries mechanism, the expanded syntax, new control file, and
> so on...? What am I missing?
>

Hi,

Thanks for providing feedback on these patches. There was indeed an
earlier approach to do this as a module parameter:

https://lkml.org/lkml/2010/9/15/397

This never quite got merged b/c I believe there were some build issues,
that never got completely resolved. I've added Thomas Renninger, the
author of that earlier appraoch to the 'cc list here.

One concern with the module parameter approach was that it reserves a
module parameter name for all modules, but perhaps if its
'ddebug_query=' that is ok. Also, I think the implmentation was
basically pass 'ddebug' as module param and it becomes:
'ddebug_query=module foo +p'. So perhaps, we could have it pass on a
full query string.

But yes, I agree the module param approach may be simpler...

Thanks,

-Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/