linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	shai@scalex86.org
Subject: Re: [rfc] [patch 1/2 ] Process private hash tables for private futexes
Date: Sat, 21 Mar 2009 21:54:14 -0700	[thread overview]
Message-ID: <20090322045414.GD7278@localdomain> (raw)
In-Reply-To: <49C4AE64.4060400@cosmosbay.com>

On Sat, Mar 21, 2009 at 10:07:48AM +0100, Eric Dumazet wrote:
>Ravikiran G Thirumalai a écrit :
>> 
>> We found this patch to improve the runtime of a certain FEA solver by about
>> 15% on a 32 core vSMP system.
>> 
>> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
>> Signed-off-by: Shai Fultheim <shai@scalex86.org>
>> 
>
>First incantation of PRIVATE_FUTEXES had process private hash table
>
>http://lkml.org/lkml/2007/3/15/230
>
>I dont remember objections at that time, maybe it was going to slow down small
>users of these PRIVATE_FUTEXES, ie processes that will maybe use one futex_wait()
> in their existence, because they'll have to allocate their private hash table
>and populate it.
>

With the current proposal, we can still use the global futex hashes for such
workloads (with the sysctl setting).

>So I dropped parts about NUMA and private hash tables to get PRIVATE_FUTEXES into mainline
>
>http://lwn.net/Articles/229668/
>
>Did you tried to change FUTEX_HASHBITS instead, since current value is really really
>ridiculous ?

We tried it in the past and I remember on a 16 core machine, we had to
use 32k hash slots to avoid false sharing.

>
>You could also try to adapt this patch to current kernels :
>
>http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-03/msg06504.html
>
>[PATCH 3/3] FUTEX : NUMA friendly global hashtable
>
>On NUMA machines, we should get better performance using a big futex
>hashtable, allocated with vmalloc() so that it is spreaded on several nodes.
>
>I chose a static size of four pages. (Very big NUMA machines have 64k page
>size)

Yes, dynamically changing the hash table is better (looking at the patch you
have posted), but still there are no locality guarantees here.  A process
pinned to node X may still end up accessing remote memory locations while
accessing the hash table.  A process private table on the other hand should
not have this problem. I think using a global hash for entirely process local
objects is bad design wise here.

  parent reply	other threads:[~2009-03-22  4:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21  4:46 [rfc] [patch 1/2 ] Process private hash tables for private futexes Ravikiran G Thirumalai
2009-03-21  4:52 ` [rfc] [patch 2/2 ] Sysctl to turn on/off private futex " Ravikiran G Thirumalai
2009-03-21  9:07 ` [rfc] [patch 1/2 ] Process private " Eric Dumazet
2009-03-21 11:55   ` [PATCH] futex: Dynamically size futexes hash table Eric Dumazet
2009-03-21 16:28     ` Ingo Molnar
2009-03-22  4:54   ` Ravikiran G Thirumalai [this message]
2009-03-22  8:17     ` [rfc] [patch 1/2 ] Process private hash tables for private futexes Eric Dumazet
2009-03-23 20:28       ` Ravikiran G Thirumalai
2009-03-23 21:57         ` Eric Dumazet
2009-03-24  3:19           ` Ravikiran G Thirumalai
2009-03-24  3:33             ` Ravikiran G Thirumalai
2009-03-24  5:31             ` Eric Dumazet
2009-03-24  7:04           ` Eric Dumazet
2009-04-23 17:30             ` Darren Hart
2009-03-21 11:35 ` Andrew Morton
2009-03-22  4:15   ` Ravikiran G Thirumalai

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=20090322045414.GD7278@localdomain \
    --to=kiran@scalex86.org \
    --cc=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=shai@scalex86.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).