Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [PATCH] modules: Take a shortcut for checking if an address is in a module | Date | Wed, 18 Jun 2008 22:27:49 +1000 |
| |
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@gmail.com> 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.
| |