lkml.org 
[lkml]   [2008]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 1/3] dynamic printk - core infrastructure
From
Date
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



\
 
 \ /
  Last update: 2008-04-04 20:37    [W:0.035 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site