All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: linux-numa@vger.kernel.org
Subject: Re: Interleaved allocation
Date: Tue, 09 Dec 2014 14:03:16 -0800	[thread overview]
Message-ID: <87lhmg4h23.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: 20141208191428.GD7371@gamayun

Martin Ichilevici de Oliveira <iomartin@iomartin.net> writes:

> 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

It's approximately (b)

> 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.

Any page allocated by the process is interleaved in access order
(which is different from what numa_alloc_interleaved does)

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

  reply	other threads:[~2014-12-09 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 19:14 Interleaved allocation Martin Ichilevici de Oliveira
2014-12-09 22:03 ` Andi Kleen [this message]
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=87lhmg4h23.fsf@tassilo.jf.intel.com \
    --to=andi@firstfloor.org \
    --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.