Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3335638rwi; Tue, 11 Oct 2022 23:55:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Q15mCTd8YqgBh4EQE5hGl6re3DyPLN35KEUU+EO+mYOUa0ywWP4hQ7vMuKCjrz+Xsk5Tu X-Received: by 2002:a17:902:d48e:b0:178:b5d:ab3 with SMTP id c14-20020a170902d48e00b001780b5d0ab3mr28137256plg.22.1665557710849; Tue, 11 Oct 2022 23:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665557710; cv=none; d=google.com; s=arc-20160816; b=jY/fWoBOQFZAcfq5m/GFgfNBy00LTH+d/5Ns+Dlm4WT1zlFYGJXXReQJUIDNICmf6A LFb8+zU+ycCxwNQUniuYWqk97m9KFSWskGiaGWR9u8ZStdPsc1ZJhOm1fWXkKORIi3PE ESU99d8YGIWAANuFQxPodG19sFeXNOG594jRJsA+v8VEJ9mauD2PKqP8F/z5k3ZokwnE 0yYgY1YjXrqC2ZEtZSMsjpDifohH+YC2IkHxTzSEfKnFcZNyq6lJ57Iv+ee45pELDKn7 5FnIvjcIAnCJjQDbsg0pAMZOAeYr4Vbq/rgiwr6eRSMSZr+nQs2pGlELe9vski7180WL f5ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=ojVOOCMXKAi8o5axDw6bSCWlRhgmjsxhm4rzRLjQdS8=; b=EqRQC15upmYlqKTuNndKlFkRt3nGh02Nxx+vUFcV1oWrvhOviejccuTtci/WD2JcdU NWNasuDKiVZR1aq1cKbaoxHZwgEL6qdZJa7ml8QTl+fU/L1cbXoViKG5DB900mR7DgDt 6mWW6uVcEZWHq0MvPJjMRORG9P/m0INtV83/7n/BRT6SCfowgiUtUqt9wKjAV8GCMiKf O8fMuxS9xcDyY7QUQaWlg9qDA4d7V6k/W895HfJk1SiUX2WV1zl7Pw34MysXrY8zUPNR 9KzFmCXdJcee85g3PT+Tygyqis2Vu9Hp29jRtXFQpCGrgEKBjZRvpqx57vu6zLuu/Tfc g+Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wBP439VT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t31-20020a63535f000000b0043a348b6198si18217092pgl.109.2022.10.11.23.54.44; Tue, 11 Oct 2022 23:55:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wBP439VT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229778AbiJLGpn (ORCPT + 99 others); Wed, 12 Oct 2022 02:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbiJLGpl (ORCPT ); Wed, 12 Oct 2022 02:45:41 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 718B75F13E for ; Tue, 11 Oct 2022 23:45:39 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9180E22529; Wed, 12 Oct 2022 06:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1665557138; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ojVOOCMXKAi8o5axDw6bSCWlRhgmjsxhm4rzRLjQdS8=; b=wBP439VTZ04PmyPij80BpmTp4nIpetCte//1J1+/YYxjGBqLxn0JoBuuMlC1FfPHyScb2O fBcBrNi2ISAPeic6i8yzA0RPDcSEHGCZJssT3afPXMlzTRT1IXgRnQw/gDh5WGm59dJ72u ZS9U5gpMuoOOoGK2dxH/G+Yf6UOPwGw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1665557138; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ojVOOCMXKAi8o5axDw6bSCWlRhgmjsxhm4rzRLjQdS8=; b=V4EzQ9/RYl1LGkcIAXvcC7LZ92n7IgX8IJV4dAZTQMATHA/J8JUghSePCtKkRbozS2HuGh mgLAmSbBZJswqKCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9E9DF13A5C; Wed, 12 Oct 2022 06:45:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id xfLjFJFiRmPXLAAAMHmgww (envelope-from ); Wed, 12 Oct 2022 06:45:37 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Chuck Lever III" Cc: "Linux NFS Mailing List" Subject: Re: [PATCH v2 7/9] NFSD: Use rhashtable for managing nfs4_file objects In-reply-to: References: <166507275951.1802.13184584115155050247.stgit@manet.1015granger.net>, <166507324882.1802.884870684212914640.stgit@manet.1015granger.net>, <166544739751.14457.9018300177489236723@noble.neil.brown.name>, Date: Wed, 12 Oct 2022 17:45:34 +1100 Message-id: <166555713439.32740.4569758527894347740@noble.neil.brown.name> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, 11 Oct 2022, Chuck Lever III wrote: > > On Oct 10, 2022, at 8:16 PM, NeilBrown wrote: > > > > On Fri, 07 Oct 2022, Chuck Lever wrote: > >> > >> -static unsigned int file_hashval(struct svc_fh *fh) > >> +/* > >> + * The returned hash value is based solely on the address of an in-code > >> + * inode, a pointer to a slab-allocated object. The entropy in such a > >> + * pointer is concentrated in its middle bits. > > > > I think you need more justification than that for throwing away some of > > the entropy, even if you don't think it is much. > > We might have that justification: > > https://lore.kernel.org/linux-nfs/YrUFbLJ5uVbWtZbf@ZenIV/ > > Actually I believe we are not discarding /any/ entropy in > this function. The bits we discard are invariant. > > And, note that this is exactly the same situation we just merged > in the filecache overhaul, and is a common trope amongst other > hash tables that base their function on the inode's address. Common? I searched for ">> *L1_CACHE_SHIFT". Apart from the nfsd filecache you mentioned I find two. One in quota and one in reiserfs. Both work with traditional hash tables which are more forgiving of longer chains. Do you have other evidence of this being a common trope? Thanks, NeilBrown