lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1285092337.26872.12.camel@gandalf.stny.rr.com>
Date:	Tue, 21 Sep 2010 14:05:37 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Jason Baron <jbaron@...hat.com>, linux-kernel@...r.kernel.org,
	mingo@...e.hu, mathieu.desnoyers@...ymtl.ca, hpa@...or.com,
	tglx@...utronix.de, 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 Tue, 2010-09-21 at 19:36 +0200, Andi Kleen wrote:
> > On Tue, 2010-09-21 at 16:41 +0200, Andi Kleen wrote:
> >> >
> >> > So there are ~150 tracepoints, but this code is also being proposed
> >> for
> >> > use with 'dynamic debug' of which there are > 1000, and I'm hoping for
> >> > more users moving forward.
> >>
> >> Even 1000 is fine to walk, but if it was sorted a binary search
> >> would be much faster anyways. That is then you would still
> >> need to search for each module, but that is a relatively small
> >> number (< 100)
> >
> > xfs has > 100 tracepoints
> 
> Doesn

I suppose you were missing a 't'.

Anyway:

 $ find fs/xfs/ -name "*.c" ! -type d | xargs grep "[ ^I]trace_" | wc -l
 313

The jump label occurs at the calling sight, not for defined tracepoints
(which can be used in multiple places).

Also take a look at fs/xfs/linux-2.6/xfs_trace.h, you will be surprised.


> >
> >>
> >> > Also, I think the hash table deals nicely with modules.
> >>
> >> Maybe but it's also a lot of code. And it seems to me
> >> that it is optimizing the wrong thing. Simpler is nicer.
> >
> > I guess simplicity is in the eye of the beholder. I find hashes easier
> > to deal with than binary searching sorted lists. Every time you add a
> > tracepoint, you need to resort the list.
> 
> The only time you add one is when you load a module, right? When you do
> that you only sort the section of the new module.

And on removing a module.

> 
> > Hashes are much easier to deal with and scale nicely. I don't think
> > there's enough rational to switch this to a binary list.
> 
> Well problem is that the code is very complicated today. I suspect
> this could be done much simpler if it wasn't so overengin
> 

Perhaps it can be cleaned up. But I have no issues with it now, and
using a hash (basic data structures 101) is not where the complexity
comes in.

-- Steve


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ