[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100921131232.GA3024@one.firstfloor.org>
Date: Tue, 21 Sep 2010 15:12:32 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Jason Baron <jbaron@...hat.com>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu,
mathieu.desnoyers@...ymtl.ca, hpa@...or.com, tglx@...utronix.de,
rostedt@...dmis.org, andi@...stfloor.org, roland@...hat.com,
rth@...hat.com, mhiramat@...hat.com, fweisbec@...il.com,
avi@...hat.com, davem@...emloft.net, vgoyal@...hat.com,
sam@...nborg.org, tony@...eyournoodle.com
Subject: Re: [PATCH 03/10] jump label v11: base patch
On Fri, Sep 17, 2010 at 11:09:00AM -0400, Jason Baron wrote:
> +extern void arch_jump_label_transform(struct jump_entry *entry,
> + enum jump_label_type type);
> +extern void jump_label_update(unsigned long key, enum jump_label_type type);
> +extern void jump_label_apply_nops(struct module *mod);
> +extern void arch_jump_label_text_poke_early(jump_label_t addr);
These function names are too long.
Also it would be better if the types for the pointers are kept
instead of casting to unsigned long. All the variables
are ints right?
> +#define JUMP_LABEL_HASH_BITS 6
> +#define JUMP_LABEL_TABLE_SIZE (1 << JUMP_LABEL_HASH_BITS)
> +static struct hlist_head jump_label_table[JUMP_LABEL_TABLE_SIZE];
It's not clear to me why this hash table is needed. There should
not be that many trace points, is it that big a problem to simply
walk all the sections when something is changed?
Or maybe the sections could be just sorted and a binary search used
like with exception tables.
I suspect that would simplify a lot of code.
Overall I like the idea, but the current code is too complicated
for the benefit I think.
Can it be put on a diet?
-Andi
--
ak@...ux.intel.com -- Speaking for myself only.
--
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