All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] perf: Store active software events in a hashlist
Date: Wed, 7 Apr 2010 14:09:10 +0200	[thread overview]
Message-ID: <20100407120909.GG5143@nowhere> (raw)
In-Reply-To: <1270641405.20295.803.camel@laptop>

On Wed, Apr 07, 2010 at 01:56:45PM +0200, Peter Zijlstra wrote:
> On Wed, 2010-04-07 at 13:52 +0200, Frederic Weisbecker wrote:
> > On Wed, Apr 07, 2010 at 11:02:26AM +0200, Peter Zijlstra wrote:
> > > On Mon, 2010-04-05 at 16:08 +0200, Frederic Weisbecker wrote:
> > > > +#define SWEVENT_HLIST_BITS     8
> > > > +#define SWEVENT_HLIST_SIZE     ((1 << (SWEVENT_HLIST_BITS + 1)) - 1)
> > > 
> > > That seems to result in 9 bits worth, doesn't it?
> > 
> > 
> > Oh right, I was confused, will zapp the + 1.
> > 
> 
> Also, what you're computing seems to be a mask, not a size
> 
> So with BITS = 8, you want
> SIZE = 1<<BITS = 256
> MASK = SIZE-1 = 255
> 
> right? 


Oh right... damn I suck in maths...


      reply	other threads:[~2010-04-07 12:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-05 14:08 [PATCH] perf: Store active software events in a hashlist Frederic Weisbecker
2010-04-06 15:27 ` Peter Zijlstra
2010-04-07  9:04   ` Peter Zijlstra
2010-04-07 11:58     ` Frederic Weisbecker
2010-04-07 12:09       ` Peter Zijlstra
2010-04-08 19:39         ` [PATCH v2] " Frederic Weisbecker
2010-04-08 20:04           ` Eric Dumazet
2010-04-08 20:11             ` Frederic Weisbecker
2010-04-07 11:56   ` [PATCH] " Frederic Weisbecker
2010-04-07 11:58     ` Peter Zijlstra
2010-04-07 12:06       ` Frederic Weisbecker
2010-04-07  9:02 ` Peter Zijlstra
2010-04-07 11:52   ` Frederic Weisbecker
2010-04-07 11:56     ` Peter Zijlstra
2010-04-07 12:09       ` Frederic Weisbecker [this message]

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=20100407120909.GG5143@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.