All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Chapman <matthewc@cse.unsw.edu.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] long format VHPT
Date: Thu, 02 Oct 2003 02:10:54 +0000	[thread overview]
Message-ID: <marc-linux-ia64-106506067204931@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106453902218848@msgid-missing>

On Thu, Oct 02, 2003 at 11:51:35AM +1000, Peter Chubb wrote:
> 
> Aurn> Darren Williams wrote:
> >  
> > -#define ia64_rid(ctx,addr)	(((ctx) << 3) | (addr >> 61))
> > +#ifdef CONFIG_IA64_LONG_FORMAT_VHPT
> > +#define redistribute_rid(rid)	(((rid) & ~0xffff) | (((rid) << 8) & 0xff00) | (((rid) >> 8) & 0xff))
> > +#else
> > +#define redistribute_rid(rid)	(rid)
> > +#endif
> > +#define ia64_rid(ctx,addr)	redistribute_rid(((ctx) << 3) | (addr >> 61))
> >  
> 
> Arun> Hi Darren, Can you explain what this code is trying to do ?
> 
> If I may comment....
> 
> The hash function that the VHPT uses works poorly for consecutive
> RIDs.  The redistribute_rid() macro flips around the low order bits to
> get something that hashes more evenly -- otherwise in the experiments
> we did, we saw major hash collision problems.

Yep.  The hash function on current processors is basically RID ^ VPN so
if you have close together RIDs and similar address space layout, which
is common (e.g. fork()) you get significant collision problems.  This was
a hack to space out the RIDs we present to the hardware without messing
with Linux's sequential allocation scheme.  Perhaps there is a better
place to do this.

Matt


      parent reply	other threads:[~2003-10-02  2:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-26  1:12 [PATCH] long format VHPT Darren Williams
2003-09-26 22:24 ` Arun Sharma
2003-09-26 23:42 ` Darren Williams
2003-09-28 23:44 ` Chen, Kenneth W
2003-09-29 17:43 ` Arun Sharma
2003-09-29 23:48 ` Darren Williams
2003-09-30 18:25 ` Arun Sharma
2003-10-01  0:58 ` Arun Sharma
2003-10-02  1:30 ` Arun Sharma
2003-10-02  1:51 ` Peter Chubb
2003-10-02  2:10 ` Matt Chapman [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=marc-linux-ia64-106506067204931@msgid-missing \
    --to=matthewc@cse.unsw.edu.au \
    --cc=linux-ia64@vger.kernel.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.