Received: by 10.223.176.5 with SMTP id f5csp904219wra; Wed, 7 Feb 2018 09:21:00 -0800 (PST) X-Google-Smtp-Source: AH8x224bOSiAySu31KlxQ1u8xUG42zkTHa1ZguFQa/tgF5G9Tq2bTx+9Ztony41PoatWYRm/imhV X-Received: by 10.98.209.93 with SMTP id t29mr6603922pfl.233.1518024060392; Wed, 07 Feb 2018 09:21:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518024060; cv=none; d=google.com; s=arc-20160816; b=uaBUATi8EWVxsEPMEWevWtmqySSuSmKO3otcuQuF7ni7KVE5/StiS27AUEk8OwcOO5 aZn1P2u/ujMQMvIQZsPf1ICjwBPt+FgCMJ7qgeIZdv7D2W1vTpu6ivmLfiuyKFtTlLxs p/nG2Hp6s0C79VZek3a/jnJh/GJvtoYFRfmBo7DhrllfUESRt3Atcvkro7S6XluWtdm6 2ZZcfVa7oX3vlGeUEL17VL6gWMGcat45V48P2ce1hrdWKfZJuYdJpFnMACIuYEzDfaCF YmbsvBOvJC5NQbRcPDltSiS2AtS4d35bdJnVMfyJZ+5G+SN3jobpliIqb9ahV4cBo/rh 0Uwg== 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:dkim-signature:arc-authentication-results; bh=FD1j1cQiQNVGj30RGukWDjZyNXqcvbZksLzO28riQJk=; b=LqWrYLacOmbqRcqDvjhN7qJSZyNLpW9A7wlwviDHGKt1SP10WJ2NlmQ4IP6xrqvkgp nTgHawx8nV91nxV+fxF5WuYPQNzSoGLgdjFAexFTwOp9lyihaoYhx4A/xVVkWCd5lj9z B00zFv6hc1trCZ6NiA9sZTFdIBHyNJ6/qhnaksBwQRTdez36xuJ37ahDP7cjgTWve2Id L+4942/MI9qPv0Cm6xb713NMItzaIeS7PGGeEYeDBQgrKelPXOHJi/vzqeQavzLm1fyw c3Zy0HNKe5X1R87Q2jkeYVqjjik617v+BSrN9wA1fkeA/LgdQ1WWwpWe2f2gLlzo37jZ IAOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QrB+kRjY; 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 f4-v6si42995plf.59.2018.02.07.09.20.46; Wed, 07 Feb 2018 09:21:00 -0800 (PST) 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=QrB+kRjY; 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 S1754764AbeBGRT6 (ORCPT + 99 others); Wed, 7 Feb 2018 12:19:58 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:58857 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754528AbeBGRT5 (ORCPT ); Wed, 7 Feb 2018 12:19:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding: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=FD1j1cQiQNVGj30RGukWDjZyNXqcvbZksLzO28riQJk=; b=QrB+kRjYYE3stz9m1Q2u6NebE TWOuiQBuCHC8JFsGJP+wwLfnvv2lLBakwh13G41+oAbAzZS6QwmEzdPbBKg8Odi8SoHKXIiGPrUQd VcJtMmhy7IIn12nz6U2WWX0CGxhYkL4R6f/AXq9S2d1+g4SChlKzO3lSAdjfCIBQCtpl+CqzpGuYp GwlVAxmoI/HZAprg0F0TISLg8mcGGgLHsY2xrCfZjJtc22rznrVgWPOOKjIHksfZO9mvSh1eiJzzi /HCkLDlVerSHFB9/XRBiZ6zo51ghMmUF9cT1IdpzBeVRq0j/kb+/02nmZZXT/5XVWzA0JWQ/Pa1tK uYwlubspA==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1ejTNg-0003Y0-Py; Wed, 07 Feb 2018 17:19:36 +0000 Date: Wed, 7 Feb 2018 09:19:36 -0800 From: Matthew Wilcox To: Steven Rostedt Cc: Christopher Lameter , "Paul E. McKenney" , Kirill Tkhai , josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, mingo@redhat.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, brouer@redhat.com, rao.shoaib@oracle.com Subject: Re: [PATCH 0/2] rcu: Transform kfree_rcu() into kvfree_rcu() Message-ID: <20180207171936.GA12446@bombadil.infradead.org> References: <151791170164.5994.8253310844733420079.stgit@localhost.localdomain> <20180207021703.GC3617@linux.vnet.ibm.com> <20180207042334.GA16175@bombadil.infradead.org> <20180207120949.62fa815f@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180207120949.62fa815f@gandalf.local.home> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 07, 2018 at 12:09:49PM -0500, Steven Rostedt wrote: > > Maybe lets implement malloc(), free() and realloc() in the kernel to be > > consistent with user space use as possible? Only use the others > > allocation variants for special cases. > > They would need to drop the GFP part and default to GFP_KERNEL. Yes, exactly. > > So malloc would check allocation sizes and if < 2* PAGE_SIZE use kmalloc() > > otherwise vmalloc(). > > Please no, I hate subtle internal decisions like this. It makes > debugging much more difficult, when allocating dynamic sized variables. > When something works at one size but not the other. You know we already have kvmalloc()?