Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3001274imm; Thu, 24 May 2018 20:54:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqLIk/Gd56MwCxVMbQFLFLLbOwFNA1O4Q31i7DpTsB2C33dhAapVctTjYQPm6YKOYnQgeKU X-Received: by 2002:a62:ce4e:: with SMTP id y75-v6mr773248pfg.175.1527220493132; Thu, 24 May 2018 20:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220493; cv=none; d=google.com; s=arc-20160816; b=fFu5tMENhY6fVO6OpOkOaoHb7NEVOEpyVxBlcCXSW87C1n0vIy0Hj5tU0vRDJy6MlV 9h8PuHqpu3TG4wUELWy8cpRpkhmQ5o7yuGXfepY0qceFlWk8J+wviBxt+K4zR0Gvv+8w MCafWAwBQyTP+7tqO3jcbqCvq/inN7K/ZnSWrCSwvrbgU9v+0EZvTOuzgts706C7+DBA yE/t65SPeYjDle0Ud00rljxDDQQsQB7ZZ/qy1ivrfNjQ37NHwQOGzeC1e1zitDP8J4Kv OFmkxyb6w9oMcdX4PW3BWPQpyY23hRhbtXjE18+wCSrK4JqtC77JrIFXvpPhDxDo7bGi O6dw== 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=9u7jAk91QBXPLvBwrj4I35ElsRWBenSyNSxPLK/lBm8=; b=oicpWbKwkk4AZq3sRZjAM5xEC6q47Ou0AwomP4q57t0snT3ZDlqn8CD4yy33ncbCqQ k/jjXmoVHWqW2Gte4JgdApQXAxIoRHozRg+b6sXmBNJBJi6aLThibTDblnOp9bwct6Rb E4CPHB3C4UXjp7EyHwx26cKCafv4oJDRfkZguRBqLO3ZkzfPUKYPBWi95a1WisS+jjJc rZ6DFv7girYI3MN+LTLpSiytdjCz/FrWLHQD11NdU36Ot6kDFl5xJy55ZhgRj6S6NX6C FlGbXmA0QB4nrLGjr6n4f8u9kSR9vaYUqShsVVzI3/cLAQEbZxjtFON76blYq+OIvp70 5edA== 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 bi1-v6si21596394plb.267.2018.05.24.20.54.38; Thu, 24 May 2018 20:54:53 -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 S964834AbeEYDyY (ORCPT + 99 others); Thu, 24 May 2018 23:54:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:51935 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964889AbeEYDvK (ORCPT ); Thu, 24 May 2018 23:51:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CF497AC43; Fri, 25 May 2018 03:51:08 +0000 (UTC) Date: Thu, 24 May 2018 20:34:27 -0700 From: Davidlohr Bueso To: Linus Torvalds Cc: Andrew Morton , Thomas Graf , Herbert Xu , Manfred Spraul , guillaume.knispel@supersonicimagine.com, Linux API , Linux Kernel Mailing List Subject: Re: [PATCH -next 0/6] rhashtable: guarantee first allocation 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 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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