[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1213784671.16944.205.camel@twins>
Date: Wed, 18 Jun 2008 12:24:31 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Ingo Molnar <mingo@...e.hu>
Cc: Vegard Nossum <vegard.nossum@...il.com>,
Arjan van de Ven <arjan@...radead.org>,
Rusty Russell <rusty@...tcorp.com.au>,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] modules: Take a shortcut for checking if an address is
in a module
On Wed, 2008-06-18 at 11:57 +0200, Ingo Molnar wrote:
> * Vegard Nossum <vegard.nossum@...il.com> wrote:
>
> > > > > Various pieces of the kernel (lockdep, latencytop, etc) tend to
> > > > > store backtraces, sometimes at a relatively high frequency. In
> > > > > itself this isn't a big performance deal (after all you're
> > > > > using diagnostics features), but there have been some
> > > > > complaints from people who have over 100 modules loaded that
> > > > > this is a tad too slow.
> >
> > 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?
> >
> > It would probably take a fair number of lines in C, and with a little
> > memory overhead, but the speed-up should be great. Should I give it a
> > try? (It would be arch-independent too.)
>
> 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.
--
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