From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] lib/rhashtable: consider param->min_size when setting initial table size Date: Tue, 17 Jul 2018 18:58:15 -0700 Message-ID: <20180717185815.20e5662318274aadcf9a9357@linux-foundation.org> References: <20180714062516.30433-1-dave@stgolabs.net> <20180716000046.yscgnpr256qhm2qg@gondor.apana.org.au> <20180717223057.7wdtjwbusxfqpvur@linux-r8p5> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Herbert Xu , tgraf@suug.ch, linux-kernel@vger.kernel.org, Davidlohr Bueso , netdev@vger.kernel.org To: Davidlohr Bueso Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:43198 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731232AbeGRCdl (ORCPT ); Tue, 17 Jul 2018 22:33:41 -0400 In-Reply-To: <20180717223057.7wdtjwbusxfqpvur@linux-r8p5> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 17 Jul 2018 15:30:57 -0700 Davidlohr Bueso wrote: > On Mon, 16 Jul 2018, Herbert Xu wrote: > > >On Fri, Jul 13, 2018 at 11:25:16PM -0700, Davidlohr Bueso wrote: > >> rhashtable_init() currently does not take into account the user-passed > >> min_size parameter unless param->nelem_hint is set as well. As such, > >> the default size (number of buckets) will always be HASH_DEFAULT_SIZE > >> even if the smallest allowed size is larger than that. Remediate this > >> by unconditionally calling into rounded_hashtable_size() and handling > >> things accordingly. > >> > >> Signed-off-by: Davidlohr Bueso > > > >Acked-by: Herbert Xu > > > >Normally these patches go through netdev so could you please resend > >it with my ack to netdev@vger.kernel.org? > > So I've done the resend, but at least would think that routing the > patch through Andrew would work best as he picked up the rhashtable > changes regarding ipc and this touches the same call. > Either approach works. Reviewed-by: Andrew Morton