Re: [PATCH] modules: Take a shortcut for checking if an address is in a module

From: Rusty Russell
Date: Wed Jun 18 2008 - 08:28:36 EST


On Wednesday 18 June 2008 20:24:31 Peter Zijlstra wrote:
> On Wed, 2008-06-18 at 11:57 +0200, Ingo Molnar wrote:
> > * Vegard Nossum <vegard.nossum@xxxxxxxxx> wrote:
> > > Would it be overkill to simply drop the module addresses in an rbtree
> > > and use that instead of a linear search over all the modules?
> >
> > that's a tempting idea. rbtrees seem to be equally robust to plain lists
> > in my experience, so i'd not find the extra complexity a showstopper, as
> > long as the changes are well-tested. (radix trees on the other hand ...
> > ;-)
>
> Radix trees are unsuited for this application, esp in their current
> implementation.
>
> > Rusty, Peter, Linus, any fundamental objections to Vegard's idea? Being
> > able to take a transparent stack-trace signature for debugging or
> > instrumentation purposes is important and performance does matter there
> > IMO.
>
> A tree makes sense, although if more archs can do the same Arjan did for
> x86 that'd be even better.

Please, just track the max and min module addresses at run time. That's
simple, arch-indep and even offers slightly better performance than
Arjan's :)

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/