Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752758AbcD1X1z (ORCPT ); Thu, 28 Apr 2016 19:27:55 -0400 Received: from www.linutronix.de ([62.245.132.108]:60544 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751801AbcD1X1x (ORCPT ); Thu, 28 Apr 2016 19:27:53 -0400 Date: Fri, 29 Apr 2016 01:26:14 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: LKML , Peter Zijlstra , Ingo Molnar , Andrew Morton , Sebastian Andrzej Siewior , Darren Hart , Michael Kerrisk , Davidlohr Bueso , Chris Mason , "Carlos O'Donell" , Torvald Riegel , Eric Dumazet Subject: Re: [patch 2/7] lib/hashmod: Add modulo based hash mechanism In-Reply-To: Message-ID: References: <20160428161742.363543816@linutronix.de> <20160428163525.495514517@linutronix.de> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 747 Lines: 24 On Thu, 28 Apr 2016, Linus Torvalds wrote: > > I'd really hate to add *another* ad-hoc hash when the previous ad-hoc > hash has been shown to be bad. I completely agree. I'm not a hashing wizard and I completely failed to understand why hash_long/ptr are so horrible for the various test cases I ran. So my ad hoc test was to use the only hash function I truly understand. It was state of the art in my university days :) And surprise, surprise it worked really well. My main focus was really to solve this futex issue which plages various people and not to dive into hashing theory for a few weeks. I'll try to dig up some time to analyze the hash_long failure unless someone familiar with the problem is beating me to it. Thanks, tglx