[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100528135549.GA2528@redhat.com>
Date: Fri, 28 May 2010 09:55:49 -0400
From: Jason Baron <jbaron@...hat.com>
To: Roman Fietze <roman.fietze@...emotive.de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dynamic_debug: allow to set dynamic debug flags right at
module load time
On Thu, May 27, 2010 at 07:05:43AM +0200, Roman Fietze wrote:
> Hello Jason,
>
> On Wednesday 26 May 2010 20:35:59 Jason Baron wrote:
>
> > ... we want this to be runtime configurable.
> > That is, we probably want this implemented as a module parameter, not as
> > a compile time thing. something like: modprobe module verbose=1
>
> Kind of
>
> #define dynamic_pr_debug(fmt, ...) do { \
> ...
> DEBUG_HASH2, __LINE__, \
> verbose ? _DPRINTK_FLAGS_PRINT : _DPRINTK_FLAGS_DEFAULT}; \
> ...
>
> But what if verbose isn't there?
>
> Or something smarter inside dynamic_debug_setup() or
> ddebug_add_module() looking for a module symbol or parameter with that
> name?
>
right, i think we want to add something inside ddebug_add_module() that
recognizes if the module was loaded with verbose=1. I think you can get
at the parameters via module->kp, which we need to pass in as well.
There is also a naming issue, in that if we "reserve" the param
"verbose", how do we make sure no other module wants to use that as a
module parameter name. Or maybe it doesn't matter if we don't consume
the parameter. That is, the parameter can mean 2 things. not sure.
thanks,
-Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists