All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Ichilevici de Oliveira <iomartin@iomartin.net>
To: linux-numa@vger.kernel.org
Subject: Interleaved allocation
Date: Mon, 8 Dec 2014 17:14:28 -0200	[thread overview]
Message-ID: <20141208191428.GD7371@gamayun> (raw)

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

Hello,

I'm trying to understand what's the exact behavior of the
interleaved allocation in libnuma. I have two questions, the first
regarding numa_alloc_interleaved() and the second regarding numactl.
Suppose I'm running in a 4-node machine.

1. What happens when I try to allocate 100 pages with a call like this:

numa_alloc_interleaved(100 * numa_pagesize())

I can think of two possible allocation schemes:
a. Pages 0-24 are allocated to node 0, pages 25-49 are allocated to
node 1, pages 50-74 are allocated on node 2 and pages 75-99 are
allocated on node 3.

b. Pages 0,4,8... are allocated on node 0, pages 1,5,9... are
allocated on node 1 and so on

2. What's the effect of using numactl --interleaved=0,1,2,3 -- ./myprog?
I would assume it "substitutes" any malloc's to
numa_alloc_interleaved(), but I'm not sure if it's just that.

Thank you,
Martin

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

             reply	other threads:[~2014-12-08 19:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 19:14 Martin Ichilevici de Oliveira [this message]
2014-12-09 22:03 ` Interleaved allocation Andi Kleen
2014-12-12  1:49   ` Martin Ichilevici de Oliveira

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=20141208191428.GD7371@gamayun \
    --to=iomartin@iomartin.net \
    --cc=linux-numa@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.