Messages in this thread | | | Subject | Re: [patch 1/3] dynamic printk - core infrastructure | From | Joe Perches <> | Date | Fri, 04 Apr 2008 11:33:46 -0700 |
| |
On Fri, 2008-04-04 at 14:13 -0400, Jason Baron wrote: > here is a re-spun patch incorporating comments from the thread.
> +#define dev_dbg(dev, format, arg...) do { \ > + if (unlikely(imv_read(dynamic_debug_on))) \
I think the use of unlikely here and in pr_debug is unnecessary.
> +static struct hlist_head file_table[FILE_TABLE_SIZE] = > + { [0 ... FILE_TABLE_SIZE-1] = HLIST_HEAD_INIT }; > +static DECLARE_MUTEX(debug_list_mutex); > +static int nr_entries;
Shouldn't this be a module_table?
I think that hashing may be an unnecessary optimization and that there's no real need to use a limited FILE_TABLE_SIZE at all. I think the most likely use cases for this facility has either one or two modules being debugged or all modules or no modules.
cheers, Joe
| |