Re: [PATCH 3/3] x86, extable: Handle early exceptions

From: Linus Torvalds
Date: Thu Apr 19 2012 - 18:58:43 EST

On Thu, Apr 19, 2012 at 3:47 PM, Tony Luck <tony.luck@xxxxxxxxx> wrote:
> How many entries are in the extable for a typical module?  Perhaps it might
> make sense to bundle them all into one sorted combined table? Of course
> you would have to have a way to squeeze them back out of the combined
> table at module unload time.
> This moves the cost to module load/unload time ... which is hopefully rare
> compared to table lookup.

Using a traditional chained hash-table might be very amenable to this
kind of situation. It's much easier to populate and doesn't have the
size issues. And realistically, we can probably size the hash table
for just the built-in kernel, because modules seldom have nearly as
many exception table entries, so adding them later to a fixed-size
table likely won't be too painful.

In fact, doing an "objdump" on the few modules I have, I didn't find a
*single* exception table entry. Maybe I did something wrong? Isn't it
the __ex_table in modules too?

(Admittedly, I avoid modules like the plague, so I don't tend to have
very many modules, and the ones I do have tend to be pretty limited.
So my module usage is absolutely not representative even if I think it
should be ;^).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at