linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Lameter <cl@linux.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Johannes Thumshirn <jthumshirn@suse.de>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Damien Le Moal <damien.lemoal@wdc.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node
Date: Wed, 27 Sep 2017 04:03:01 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.20.1709270358400.30866@nuc-kabylake> (raw)
In-Reply-To: <20170927084251.kxves5ce76jz5skr@dhcp22.suse.cz>

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.

Note that node local policy is the default for allocations but that can be
overridden by the application or at the command line level. Assumptions
that this is always the case come up frequently but if we do that we will
loose the ability to control memory locality for user space.

  reply	other threads:[~2017-09-27  9:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27  8:20 [PATCH 0/6] Add kmalloc_array_node() and kcalloc_node() Johannes Thumshirn
2017-09-27  8:20 ` [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node Johannes Thumshirn
2017-09-27  8:42   ` Michal Hocko
2017-09-27  9:03     ` Christopher Lameter [this message]
2017-09-27  9:16       ` Michal Hocko
2017-09-27  8:56   ` Christopher Lameter
2017-09-29 12:00   ` Vlastimil Babka
2017-09-27  8:20 ` [PATCH 2/6] block: use kmalloc_array_node Johannes Thumshirn
2017-09-27  8:57   ` Christopher Lameter
2017-09-27  8:20 ` [PATCH 3/6] IB/qib: " Johannes Thumshirn
2017-09-27  8:58   ` Christopher Lameter
2017-09-27  8:20 ` [PATCH 4/6] IB/rdmavt: " Johannes Thumshirn
2017-09-27  9:04   ` Christopher Lameter
2017-09-27  8:20 ` [PATCH 5/6] mm, mempool: " Johannes Thumshirn
2017-09-27  9:04   ` Christopher Lameter
2017-09-27  8:20 ` [PATCH 6/6] rds: ib: " Johannes Thumshirn
2017-09-27  9:03   ` Christopher Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1709270358400.30866@nuc-kabylake \
    --to=cl@linux.com \
    --cc=akpm@linux-foundation.org \
    --cc=damien.lemoal@wdc.com \
    --cc=hch@lst.de \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).