Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp689956rbb; Sat, 24 Feb 2024 21:53:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWWKd6CfEOMHbQ0AFnC2Pg7/GXsCWnibUZ/YBFp0Kj4mPQ+6EuhaabSjMz2GtMaM1RxmshRo7NmhpcrgD0S+G0nnKrYhm81oCnaQL66og== X-Google-Smtp-Source: AGHT+IGkgA9Dx/gKiUQTlXoBlDJs3CWVN2BwkiepDAKfX/xqNwihRy7Dr+eB9ns6ZHrC0uKpJgds X-Received: by 2002:a05:6512:203c:b0:512:a009:6e21 with SMTP id s28-20020a056512203c00b00512a0096e21mr1969580lfs.31.1708840434496; Sat, 24 Feb 2024 21:53:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708840434; cv=pass; d=google.com; s=arc-20160816; b=QyeO0EzkoyJ4T6SEoy0I1VkxG/SyrXORZf54Azyh8p6XyulkmLsUyb29PG9qWRJXVD oWyfAbDrFSHrPaMgA7zk8YlCNzlQNfDuUZhCL9OEcpug/Wb+WHyPvjIZktBO6RVACrKT PhmnPMB2dF/ekxL2p2v9j5Fscgl9fJ5+JFGqyJVzZmLNColJEskhAaCBmA0L1emu+8j4 z0LuTa9grmymiCEn+9dYzGGJ2Ni9+h+m7t6LKoW2c3hw2uDIBn7TyRErgVQuG7uxXLNh YhTwjaH7wqrz+dYHyMipRn4mCU59LncS6AjjEcEKgnLW/p4U0Vis8GxMrLJ2vrXyIb4N wsbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=K4+HQTtQZS5ryaao+e2j74ZmBFEighFJ2fgjybduOt0=; fh=qvRb1ZPfjFDAqjD1KqmpIaWC+E0OJZlG6tj0ZJw+68k=; b=VzdCT3SEa5hDWeSZwmM0m4deifeQLogy3+3j9Jfxr7pXqVgXLxFRzX3KO9hVVHk/gK W/9Vopm8Y/FoH529CqrHZMzyt/ySstTYiEAe5LYAKfiyCI5PiciAb376mnX9NH/6+v3B vKGyS19p7l5nB9phESwfdfTPbB/5GYh/8ntHpHf+0LABdmAhA0T/BSI+FLieShq1JM8o o3c4JK1mL8OFfeuU502wpm7zzSQund3A6Ndf6HP7t66afvlDHLf0Bvji+ax4sS457GRU pd4hrIzQ17jHMcNZ/U7AgLMHh6xCz/pMskXRsqX7dv8lebmgsA1MMekyt6iyrTRTtdcM 5/5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au dmarc=pass fromdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-kernel+bounces-79984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79984-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=QUARANTINE dis=NONE) header.from=apana.org.au Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f10-20020a170906138a00b00a431e4d5defsi321516ejc.797.2024.02.24.21.53.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 21:53:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au dmarc=pass fromdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-kernel+bounces-79984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79984-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=QUARANTINE dis=NONE) header.from=apana.org.au Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3EE041F21AB4 for ; Sun, 25 Feb 2024 05:53:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 579A2CA64; Sun, 25 Feb 2024 05:53:39 +0000 (UTC) Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 761723201; Sun, 25 Feb 2024 05:53:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708840418; cv=none; b=srg5IKWnQFL2ML5DEpAJYn8gkxhsqgB3GacZWl8bRuFX4inDT3eN4dDOk7lWNvQt9TVU4UCiBsk0Qbentmkwi1UTrGVLJqD7/6WT2N/SxlbdAYSK0ni9k1Y97zbyv9ejusuyHfvkQo3wMBEHfsabAbkdWGKVryIPSykRtM5iowY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708840418; c=relaxed/simple; bh=zAHIzMeRwf0+2hZbQZq917hWjTFkGaeqRoTKoOY7VsU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N0JdBtS4bcJtyWNLf9eq+flpCsP9L5GuDAhWTatV8CRs184a/h1dlgGk6yK+XbnxSCgYfKiGTrztKo5torkHIo3YZd5uVSiz42Mq9jiVY4GMNIv3PgSmrUbDWuaWc3YKK/i5clrdXC2v+oDoc1V1L/xGDPK6eZa7iNF6kL1O52s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1re7Rw-00HVnp-Fl; Sun, 25 Feb 2024 13:53:21 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Sun, 25 Feb 2024 13:53:35 +0800 Date: Sun, 25 Feb 2024 13:53:35 +0800 From: Herbert Xu To: Kent Overstreet Cc: Matthew Wilcox , David Laight , "linux-kernel@vger.kernel.org" , Thomas Graf , "netdev@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "maple-tree@lists.infradead.org" , "rcu@vger.kernel.org" Subject: Re: [PATCH 0/1] Rosebush, a new hash table Message-ID: References: <20240222203726.1101861-1-willy@infradead.org> <4a1416fcb3c547eb9612ce07da6a77ed@AcuMS.aculab.com> <2s73sed5n6kxg42xqceenjtcwxys4j2r5dc5x4fdtwkmhkw3go@7viy7qli43wd> <5p5sypt3y643rr7kp66lhmgksgtuvdgijrryh53mqiiqkrgyty@d4zcnya22owg> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5p5sypt3y643rr7kp66lhmgksgtuvdgijrryh53mqiiqkrgyty@d4zcnya22owg> On Sun, Feb 25, 2024 at 12:51:06AM -0500, Kent Overstreet wrote: > > but your distribution actually is accurate in general, golden ratio hash > is relly nice for sequential integers. the actual problem with your test > is that you're testing 100% occupancy - no one does that. > > 75% occupancy, siphash: > 0: 933 > 1: 60 > 2: 6 > 3: 1 > 4: 0 > > that looks about right to me. The point is that the worst-case length grows with the size of the table so it won't always be 3. You need to take into account the largest table size that you will support. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt