linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Kent Overstreet' <kent.overstreet@linux.dev>
Cc: 'Herbert Xu' <herbert@gondor.apana.org.au>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Graf <tgraf@suug.ch>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>,
	"rcu@vger.kernel.org" <rcu@vger.kernel.org>
Subject: RE: [PATCH 0/1] Rosebush, a new hash table
Date: Sun, 25 Feb 2024 14:47:45 +0000	[thread overview]
Message-ID: <2a6001442b354c2fb5b881c2a9d75895@AcuMS.aculab.com> (raw)
In-Reply-To: <2s73sed5n6kxg42xqceenjtcwxys4j2r5dc5x4fdtwkmhkw3go@7viy7qli43wd>

From: Kent Overstreet
> Sent: 25 February 2024 03:19
..
> when I implemented cuckoo (which is more obviously sensitive to a weak
> hash function), I had to go with siphash, even jhash wasn't giving me
> great reslts. and looking at the code it's not hard to see why, it's all
> adds, and the rotates are byte aligned... you want mixed adds and xors
> and the rotates to be more prime-ish.
> 
> right idea, just old...
> 
> what would be ideal is something more like siphash, but with fewer
> rounds, so same number of instructions as jhash. xxhash might fit the
> bill, I haven't looked at the code yet...

There is likely to be a point where scanning a list of values
for the right hash value is faster than executing a hash function
that is good enough to separate them to separate buckets.

You don't want to scan a linked list because they have horrid
cache footprints.
The locking is equally horrid - especially for remove.
Arrays of pointers ar ethe way forward :-)

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2024-02-25 14:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 20:37 [PATCH 0/1] Rosebush, a new hash table Matthew Wilcox (Oracle)
2024-02-22 20:37 ` [PATCH 1/1] rosebush: Add new data structure Matthew Wilcox (Oracle)
2024-02-25  6:38   ` Al Viro
2024-02-23 11:37 ` [PATCH 0/1] Rosebush, a new hash table Peng Zhang
2024-02-23 13:55 ` Jason A. Donenfeld
2024-02-23 18:40 ` Kent Overstreet
2024-02-24  0:20 ` Herbert Xu
2024-02-24 22:10   ` David Laight
2024-02-25  0:50     ` Herbert Xu
2024-02-25  3:20       ` Kent Overstreet
2024-02-25  3:18     ` Kent Overstreet
2024-02-25  5:01       ` Matthew Wilcox
2024-02-25  5:32         ` Herbert Xu
2024-02-25  5:51         ` Kent Overstreet
2024-02-25  5:53           ` Herbert Xu
2024-02-25  6:14             ` Kent Overstreet
2024-02-25  6:17               ` Herbert Xu
2024-02-25 14:47       ` David Laight [this message]
2024-02-25 21:48         ` Kent Overstreet

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=2a6001442b354c2fb5b881c2a9d75895@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maple-tree@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=tgraf@suug.ch \
    --cc=willy@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 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).