Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752606AbdI0JQZ (ORCPT ); Wed, 27 Sep 2017 05:16:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:44468 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752157AbdI0JQX (ORCPT ); Wed, 27 Sep 2017 05:16:23 -0400 Date: Wed, 27 Sep 2017 11:16:19 +0200 From: Michal Hocko To: Christopher Lameter Cc: Johannes Thumshirn , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Damien Le Moal , Christoph Hellwig Subject: Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node Message-ID: <20170927091619.lkhfhwv3uu3km3sv@dhcp22.suse.cz> References: <20170927082038.3782-1-jthumshirn@suse.de> <20170927082038.3782-2-jthumshirn@suse.de> <20170927084251.kxves5ce76jz5skr@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 680 Lines: 19 On Wed 27-09-17 04:03:01, Cristopher Lameter wrote: > On Wed, 27 Sep 2017, Michal Hocko wrote: > > > > Introduce a combination of the two above cases to have a NUMA-node aware > > > version of kmalloc_array() and kcalloc(). > > > > Yes, this is helpful. I am just wondering why we cannot have > > kmalloc_array to call kmalloc_array_node with the local node as a > > parameter. Maybe some sort of an optimization? > > Well the regular kmalloc without node is supposed to follow memory > policies. An explicit mentioning of a node requires allocation from that > node and will override memory allocation policies. I see. Thanks for the clarification -- Michal Hocko SUSE Labs