Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp95257imm; Thu, 21 Jun 2018 14:35:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKUfRcmvoJ/EXydFgFJUlyhLh6Jr3NlfXSeo38dJkR9uNGwtgUQ4AQ/g3y6yAnHSJSjdKX0 X-Received: by 2002:a62:1bc2:: with SMTP id b185-v6mr29150587pfb.225.1529616943483; Thu, 21 Jun 2018 14:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529616943; cv=none; d=google.com; s=arc-20160816; b=R3jMiyq0kqA8lloTPXFFE3VpxzsKm3Zipde1H8JeHdifn/RRfo9Z3NlWa0pJgd+8Sa cKU6ojf9KZzM834WgkYfhcJhPAbq3nZqXwQ43GgWBIEXZqaKaEFQiW912jbRYHfiSTmS kbbfAetqbEZV4+hdqWcE4Gbj+B+UIms5BBzGHD5dNIQwRphofZJwxff6B/u/sfVY1xZk gDjc+bUe2c2GE3a7spA467Ylo8PqLK9IC5qxYWj697DuVlYLnuoexUOASnERtQl7K5TE 43koY4hLRLHvbvVpxMI+nXRi2nhsPG+PepObVvvsixOPbDM7QtCTa2RGv4NahZd7CW/G om5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=oJA8yMzD5QRVClUYJJ3+gGUlvGiMJkZn3ASr4Vbg9E8=; b=cmun+xM/re6cOrN3KLOtmgXgEWEuLTNZcn2B5jxYMjjuRgQ2XqgaDPn/d9RQBwPbZ0 jFmXErkBKOT5/1eWH8qiBpdEah33TCz2Z/nXm6nQnTY3D/6w0r1YasjlhsEaTN1QRWW8 561OoFzUievWnjZ6ju1KZxEIqeUn7yLra7WV8MgSouwWY7i8QgmJaMLhg+9AlEpx3asw u4KohaBumZ2E4UpgKt2MP4L4fVYjIszr8SkGgdJw3MVBN9Q6AId3PUc2eq/2TJQWDSql hBGkYNk4bk1yPnsWPJWiuxtMLfiCr/cYnUsDu3SeQU3S8ep2oFhFjzi1Zp8Y5OHKKx9s TT4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JNRVFNTy; 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 9-v6si5791650ple.104.2018.06.21.14.35.29; Thu, 21 Jun 2018 14:35:43 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JNRVFNTy; 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 S933854AbeFUVdU (ORCPT + 99 others); Thu, 21 Jun 2018 17:33:20 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43582 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933664AbeFUVdS (ORCPT ); Thu, 21 Jun 2018 17:33:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oJA8yMzD5QRVClUYJJ3+gGUlvGiMJkZn3ASr4Vbg9E8=; b=JNRVFNTy/NSTgIBmeJxSjRFzo 1CN0f9QoEYdnR0DiLBilVyJ9l6JKSqNby5eG5S8uDtaoUtHOEngLNYmL+tN3YGV7WGX4PGzPfhs/I 9vR3FSAVe+8mPn/sIyLC8B0EoppQ6yHNIIR1/U13ajmZBnj1ia990bieqFWJ+wuQh3OL+3dwD1Cz9 ysRWYV2Dpbk6cJ59qadNdUAWR+xIc9dPouiQzQjmRbwqDPWzp3MegamM9JWpkT0RksSSxbwMT1WkE iTZnIb8mdSsbK1931qEO630XZ5VYRsX1zqHI/p50CzifjoT1Y+ldUJf6Ns3+nOEqgi4bUx7WEZZ+W 57zrA6K4g==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fW7Cd-0003Pl-Jf; Thu, 21 Jun 2018 21:33:15 +0000 Subject: Re: [PATCH 1/4] lib/rhashtable: simplify bucket_table_alloc() To: Davidlohr Bueso , akpm@linux-foundation.org, torvalds@linux-foundation.org Cc: tgraf@suug.ch, herbert@gondor.apana.org.au, manfred@colorfullife.com, mhocko@kernel.org, guillaume.knispel@supersonicimagine.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso References: <20180621212825.3059-1-dave@stgolabs.net> <20180621212825.3059-2-dave@stgolabs.net> From: Randy Dunlap Message-ID: Date: Thu, 21 Jun 2018 14:33:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180621212825.3059-2-dave@stgolabs.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/21/2018 02:28 PM, Davidlohr Bueso wrote: > As of ce91f6ee5 (mm: kvmalloc does not fallback to vmalloc for incompatible gfp flag), > we can simplify the caller and trust kvzalloc() to just do the right thing. Hi, JFYI, we are using 12-digit (12-character) commit IDs nowadays... > Signed-off-by: Davidlohr Bueso > --- > lib/rhashtable.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/lib/rhashtable.c b/lib/rhashtable.c > index 9427b5766134..26c9cd8a985a 100644 > --- a/lib/rhashtable.c > +++ b/lib/rhashtable.c > @@ -175,10 +175,7 @@ static struct bucket_table *bucket_table_alloc(struct rhashtable *ht, > int i; > > size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]); > - if (gfp != GFP_KERNEL) > - tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY); > - else > - tbl = kvzalloc(size, gfp); > + tbl = kvzalloc(size, gfp); > > size = nbuckets; > > -- ~Randy