From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Greg KH <greg@kroah.com>
Subject: Re: [patch 1/2] infrastructure to debug (dynamic) objects
Date: Sun, 2 Mar 2008 11:06:32 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.1.00.0803021055180.11084@apollo.tec.linutronix.de> (raw)
In-Reply-To: <1204411377.6240.13.camel@lappy>
On Sat, 1 Mar 2008, Peter Zijlstra wrote:
> On Sat, 2008-03-01 at 12:44 +0100, Thomas Gleixner wrote:
> > On Sat, 1 Mar 2008, Andrew Morton wrote:
>
> > > > +
> > > > +#define ODEBUG_HASH_SIZE 4096
> > >
> > > power-of-2 is said to be a very poor size for a hash table.
> >
> > The hash is not a randomized hash as one would expect. It's purely
> > generated from the object address to simplify the lookup during the
> > free check. So the power of 2 size is a good thing :) /me adds
> > comment.
>
> Power of two buckets work when used along with a golden ratio based hash
> map - as done by linux/hash.h.
>
> Power of two hash maps otoh suck royally.
Well, using a real hash algorithm sucks royally if you need to do the
reverse check on *free(). With the direct object address to hash
bucket mapping we have usually only one bucket to look at, otherwise
we end up looking at multiple buckets and doing the list walk on each
of them. We have to decide which suckage is worse :)
Thanks,
tglx
next prev parent reply other threads:[~2008-03-02 10:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-01 10:24 [patch 0/2] object debugging infrastructure Thomas Gleixner
2008-03-01 10:24 ` [patch 1/2] infrastructure to debug (dynamic) objects Thomas Gleixner
2008-03-01 10:51 ` Andrew Morton
2008-03-01 11:44 ` Thomas Gleixner
2008-03-01 22:42 ` Peter Zijlstra
2008-03-02 10:06 ` Thomas Gleixner [this message]
2008-03-01 10:25 ` [patch 2/2] add timer specific object debugging code Thomas Gleixner
2008-03-02 5:20 ` [patch 0/2] object debugging infrastructure Greg KH
2008-03-02 9:54 ` Thomas Gleixner
2008-03-03 12:42 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.1.00.0803021055180.11084@apollo.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®