Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2950797imm; Thu, 24 May 2018 19:44:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp5uBIFB8fZTQXfhu3WQiGHcTiOx10UjeCMCoaB3r+BMy14ihjhwEmJkVxSGV+hDCqA7tnU X-Received: by 2002:a63:803:: with SMTP id 3-v6mr489746pgi.406.1527216282618; Thu, 24 May 2018 19:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216282; cv=none; d=google.com; s=arc-20160816; b=cVCM7DZSZt89YT19PeP6O8HdsmCuhZehe37djvgCjXLJ+BMyGv6+07Jont6TadMaS5 x+Y6K6k4GVFtNNou8BY/oYTo01gXOysyeTqtOnPL6Y2DT7rXmVYkRkt4U1A7sD8JzhCA 0PI7IlG79K3dhXXh982QVm0euHSoFaokEby9+E5aQ/h7jeymrmWkBDxJlc3LG77tOxDu JpBO0c5r075uCwBdfZeXfsB5gtGbnYoZZbOtrXMNVmvdxBIAqCsloXOs5j+ednJi9Lxs lN5uxDVQvJvrPoo/STxvP/wM5kL6hxn/O8pIn0PJHV776WZhUsZz3Jdcmf0kWtshN1VO b/nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=7L29zfsXE8I/H5AuVfPT2cm3G5M7zTkRgbLdC99QqaE=; b=hHy3KD7yKzGIEKCBxh6msu8ymGyPsdCqShE+32RbX5rIA185Cswn+9QZVQJ94xRKR2 nqeWF9tcgAHZ3tSaq+KlbWdxLL/Lxa/KloLgHbFfHk0Map42O0R2mKaMEbvuM/BpW4/8 /8wHuAFTJmdhPMfDmmr0ic9HzxrdLPgvj2OfBUNaKrXePHGCOyp5bkygvKN/NOfCYftJ lE8JO/3rIch4CCt19VLgJ6jpKoR9ReVOJLs7FNcPJGFYywkdz2lwjGAKtNlngKfHEgvf PAB2zSPYyntP9eCgvBg9TD8SSPQGo4ws8wo2YMlGbIdSTU6qptsBhMH/DSAg/gEX3bfq 6Zwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=LHjYV9Iu; 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 k10-v6si17230408pgc.299.2018.05.24.19.44.28; Thu, 24 May 2018 19:44:42 -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=pass header.i=@linux-foundation.org header.s=google header.b=LHjYV9Iu; 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 S971660AbeEXVmA (ORCPT + 99 others); Thu, 24 May 2018 17:42:00 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:36686 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S971631AbeEXVly (ORCPT ); Thu, 24 May 2018 17:41:54 -0400 Received: by mail-it0-f67.google.com with SMTP id e20-v6so4355127itc.1; Thu, 24 May 2018 14:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7L29zfsXE8I/H5AuVfPT2cm3G5M7zTkRgbLdC99QqaE=; b=LHjYV9IuSwpi5v/sAUlxwsqRNyMHqL17ChpXVdj4u9OUzrSaausOAz2Q7GiG8c3EDE VM9eHzl8OrjAcEjd74fzzMEfUDNMZPieJizesBrDmLgDRX33fCxNput2OtlPVYkG0ESI uFedmmwn4V7UPgLnb3rQogfx5JkyMhJtsuNwU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7L29zfsXE8I/H5AuVfPT2cm3G5M7zTkRgbLdC99QqaE=; b=g3oVrgcCsIP+nInF4FKK5iO9ACssV7C8Z+SoW/9dHKtFewBCXM7dyNYn4Ux7dwDTvQ HJS4ncRO4zI+CHX7PXjkKLdbdPqVF0T3/9bazEEYBH8LTPGbhsGVRO6EWmnju0MCRA2y CLHQDFlJiPLsg3a+c9uT4DJe/ld6nR2eO1nRGV+Dofk5fEhA91eUvdqVWZzAixlm9Jmy J6bVFlYLtGFTdJWYNWtW7/91iG0Zclh9T6MRApZVhMCFWHWoIDFU92ceIsJteqbCxwK2 /ewoBlWkr2f9QaIxrNzPFHq24YRo+36Ozo5QjE9jQ/PcQqgIh/w068ioJy0inqHWYk/A sslQ== X-Gm-Message-State: ALKqPwegxFY5sdBZvvq+7hKSc1EOxDDPj6J09ja5c7DSfIHI/qthOYJ/ bSKQlg5lCCt042c86nfvbcUwWWdY8xKgNqX0VFM= X-Received: by 2002:a24:4c55:: with SMTP id a82-v6mr10730342itb.1.1527198114060; Thu, 24 May 2018 14:41:54 -0700 (PDT) MIME-Version: 1.0 References: <20180524211135.27760-1-dave@stgolabs.net> In-Reply-To: <20180524211135.27760-1-dave@stgolabs.net> From: Linus Torvalds Date: Thu, 24 May 2018 14:41:42 -0700 Message-ID: Subject: Re: [PATCH -next 0/6] rhashtable: guarantee first allocation To: Davidlohr Bueso Cc: Andrew Morton , Thomas Graf , Herbert Xu , Manfred Spraul , guillaume.knispel@supersonicimagine.com, Linux API , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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". Linus