From mboxrd@z Thu Jan 1 00:00:00 1970 From: Davidlohr Bueso Subject: Re: [PATCH -next 0/6] rhashtable: guarantee first allocation Date: Thu, 24 May 2018 20:34:27 -0700 Message-ID: <20180525033427.ydkkmadagerkzove@linux-n805> References: <20180524211135.27760-1-dave@stgolabs.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds Cc: Andrew Morton , Thomas Graf , Herbert Xu , Manfred Spraul , guillaume.knispel@supersonicimagine.com, Linux API , Linux Kernel Mailing List List-Id: linux-api@vger.kernel.org On Thu, 24 May 2018, Linus Torvalds wrote: >On Thu, May 24, 2018 at 2:28 PM Davidlohr Bueso wrote: >> 10 files changed, 79 insertions(+), 86 deletions(-) > >I certainly can't complain about this small code removal, but I think if we >did the kvmalloc_node() cleanup, we'd be able to get rid of even more. > >For example, bucket_table_alloc() does that > > if (gfp != GFP_KERNEL) > tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY); > else > tbl = kvzalloc(size, gfp); > >purely due to the kvalloc_node() oddity. Wouldn't it be nice to just write >it as > > tbl = kvzalloc(size, gfp); > >knowing that the whole point of all the kv*alloc*() functions is to "just >do the right thing given size, gpf mask, and ease of allocation". Yes this makes a lot of sense. I'll see about adding it on top. Thanks, Davidlohr