From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754662AbeBGRJx (ORCPT ); Wed, 7 Feb 2018 12:09:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:41008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753390AbeBGRJw (ORCPT ); Wed, 7 Feb 2018 12:09:52 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC63921788 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Wed, 7 Feb 2018 12:09:49 -0500 From: Steven Rostedt To: Christopher Lameter Cc: Matthew Wilcox , "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: <20180207120949.62fa815f@gandalf.local.home> In-Reply-To: References: <151791170164.5994.8253310844733420079.stgit@localhost.localdomain> <20180207021703.GC3617@linux.vnet.ibm.com> <20180207042334.GA16175@bombadil.infradead.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Feb 2018 10:47:02 -0600 (CST) Christopher Lameter wrote: > On Tue, 6 Feb 2018, Matthew Wilcox wrote: > > > Personally, I would like us to rename kvfree() to just free(), and have > > malloc(x) be an alias to kvmalloc(x, GFP_KERNEL), but I haven't won that > > fight yet. > > 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. > > 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. -- Steve > > free() would free anything you give it.