On Wed, Jun 19, 2024 at 03:08:47PM -0700, Linus Torvalds wrote: > On Wed, 19 Jun 2024 at 13:45, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > > > Funnily, I'm working on rosebush v2 today. It's in no shape to send out > > (it's failing ~all of its selftests) but *should* greatly improve the > > cache friendliness of the hash table. And it's being written with the > > dcache as its first customer. > > I'm interested to see if you can come up with something decent, but > I'm not hugely optimistic. Well, I've now come up with something _working_. There are still things to be fixed, but it might be interesting for a performance comparison. So I've pushed it out to http://git.infradead.org/?p=users/willy/pagecache.git;a=shortlog;h=refs/heads/rosebush where I hope 01.org will pick up on it and run some performance tests. > From what I saw, you planned on comparing with rhashtable hash chains of 10. That was the comparison I made (and it turns out I misunderstood rhashtable entirely; the length is where it does an emergency resize, and usually its size is such that the average hash length is <1) What I was reacting to in your email was this: : And on my arm64 machine, it turns out that the best optimization for the : load I tested would be to make that hash table smaller to actually be a : bit denser in the cache, But that's such a load-dependent optimization : that I'm not doing this. And that's exactly what rosebush does; it starts out incredibly small (512 bytes) and then resizes as the buckets overflow. So if you suspect that a denser hashtable would give you better performance, then maybe it'll help. Or maybe not; it's not like I've done thorough testing.