Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1740530

Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node

From Christopher Lameter <cl@linux.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node
Date 2017-09-27 11:10 +0200
Message-ID <uugvT-kx-21@gated-at.bofh.it> (permalink)
References <uufTc-8kl-13@gated-at.bofh.it> <uufTc-8kl-21@gated-at.bofh.it> <uugcx-8qD-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] Add kmalloc_array_node() and kcalloc_node() Johannes Thumshirn <jthumshirn@suse.de> - 2017-09-27 10:30 +0200
  [PATCH 4/6] IB/rdmavt: use kmalloc_array_node Johannes Thumshirn <jthumshirn@suse.de> - 2017-09-27 10:30 +0200
    Re: [PATCH 4/6] IB/rdmavt: use kmalloc_array_node Christopher Lameter <cl@linux.com> - 2017-09-27 11:10 +0200
  [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node Johannes Thumshirn <jthumshirn@suse.de> - 2017-09-27 10:30 +0200
    Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node Michal Hocko <mhocko@kernel.org> - 2017-09-27 10:50 +0200
      Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node Christopher Lameter <cl@linux.com> - 2017-09-27 11:10 +0200
        Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node Michal Hocko <mhocko@kernel.org> - 2017-09-27 11:20 +0200
    Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node Christopher Lameter <cl@linux.com> - 2017-09-27 11:00 +0200
    Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node Vlastimil Babka <vbabka@suse.cz> - 2017-09-29 14:10 +0200
  [PATCH 2/6] block: use kmalloc_array_node Johannes Thumshirn <jthumshirn@suse.de> - 2017-09-27 10:30 +0200
    Re: [PATCH 2/6] block: use kmalloc_array_node Christopher Lameter <cl@linux.com> - 2017-09-27 11:00 +0200
  [PATCH 3/6] IB/qib: use kmalloc_array_node Johannes Thumshirn <jthumshirn@suse.de> - 2017-09-27 10:30 +0200
    Re: [PATCH 3/6] IB/qib: use kmalloc_array_node Christopher Lameter <cl@linux.com> - 2017-09-27 11:00 +0200
  [PATCH 5/6] mm, mempool: use kmalloc_array_node Johannes Thumshirn <jthumshirn@suse.de> - 2017-09-27 10:30 +0200
    Re: [PATCH 5/6] mm, mempool: use kmalloc_array_node Christopher Lameter <cl@linux.com> - 2017-09-27 11:10 +0200

csiph-web