Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp786360imm; Fri, 1 Jun 2018 09:30:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK890eT954bTz7jw+Gmv2VCgpvPvTSe7/PoiV2AnpfywtnfoOGBwzdy4ENCzrHRpi6VJkun X-Received: by 2002:a17:902:8602:: with SMTP id f2-v6mr11740216plo.5.1527870604746; Fri, 01 Jun 2018 09:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527870604; cv=none; d=google.com; s=arc-20160816; b=sSzhE9dENMYhugpB1Q1DoOBNwry+MI0gvBPNttUEqBWsBeoM8cUyvVbZmLrA8DUgK9 yZz5m0gyRvi9Ey8KajfGkGuj3wwsYNgfOiV6LP0JrLkz5qw70m1Do7cz2tx5uCligCew TCXpfOFfm0NjhcIqS+jJJP/PLjFihri5EQ2Q+s9bzz/UIFI0F1a8ix7pmzRR/W0GMvr+ zelP1CnkzOHkldzMUzOVTr9RtggIC85VRt0bDToRKnzyH9u09C2tsOlZ2ElyhBWYZTmb fVr7Uu+u9mhUT2D+MwjYgHc1fyRZ1GPKX8ba6/qtb7zPMf1627w9HTWSoXZUUwCT28P+ XIQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=7CRraQALSW5JG5Vu6GeRHlNjS+WoNjSkfMuT8CA/Fig=; b=K/Iu/brlrxowSwOJo6z+BL7sZQFZeQ3uyj7FtnYaOiv6pDNRFMpBnTTmdUApzU1xSC DaVg1lNUfLmYZscHAMMcBdbuRKgleQ2EFpRclEPO6Wxn6tDM8yrPwJ2/maQPmKnpFI4i lqGOWsyY2ZF/nUNwE5W7Aum/6sgggs73/mwNwDanBrianxhxOCUFgF/d798QAZGFAQ1r uwomiHXCxn/IdIuF6yQek2hNl+KzsKayOvdZwZngLMPkoJkzbW8WXAoI2zJM4MaaD39p OEVKWIRXVh9460v5Ls7G/s+SmhmN2haJubIXRAz/1GDfqjQzcpb/jsuxWG3yqRPp25sk SoXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k88-v6si13047346pfk.369.2018.06.01.09.29.50; Fri, 01 Jun 2018 09:30:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641AbeFAQ3L (ORCPT + 99 others); Fri, 1 Jun 2018 12:29:11 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:58060 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777AbeFAQ3K (ORCPT ); Fri, 1 Jun 2018 12:29:10 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1fOmvH-0005HT-UE; Sat, 02 Jun 2018 00:29:03 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1fOmvD-0001MR-TQ; Sat, 02 Jun 2018 00:28:59 +0800 Date: Sat, 2 Jun 2018 00:28:59 +0800 From: Herbert Xu To: NeilBrown Cc: Thomas Graf , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/18] rhashtable: simplify nested_table_alloc() and rht_bucket_nested_insert() Message-ID: <20180601162859.g3xwnpri3scprgfj@gondor.apana.org.au> References: <152782754287.30340.4395718227884933670.stgit@noble> <152782824950.30340.10831876745236207066.stgit@noble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152782824950.30340.10831876745236207066.stgit@noble> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 01, 2018 at 02:44:09PM +1000, NeilBrown wrote: > Now that we don't use the hash value or shift in nested_table_alloc() > there is room for simplification. > We only need to pass a "is this a leaf" flag to nested_table_alloc(), > and don't need to track as much information in > rht_bucket_nested_insert(). > > Note there is another minor cleanup in nested_table_alloc() here. > The number of elements in a page of "union nested_tables" is most naturally > > PAGE_SIZE / sizeof(ntbl[0]) > > The previous code had > > PAGE_SIZE / sizeof(ntbl[0].bucket) > > which happens to be the correct value only because the bucket uses all > the space in the union. > > Signed-off-by: NeilBrown Acked-by: Herbert Xu -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt