linux-numa.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Ichilevici de Oliveira <iomartin@iomartin.net>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-numa@vger.kernel.org
Subject: Re: Interleaved allocation
Date: Thu, 11 Dec 2014 23:49:23 -0200	[thread overview]
Message-ID: <20141212014923.GA2843@gamayun> (raw)
In-Reply-To: <87lhmg4h23.fsf@tassilo.jf.intel.com>

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

On Tue, Dec 09, 2014 at 02:03:16PM -0800, Andi Kleen wrote:
> 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,

Thank you for clarifying these up.

Martin

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

      reply	other threads:[~2014-12-12  1:49 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
2014-12-12  1:49   ` Martin Ichilevici de Oliveira [this message]

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=20141212014923.GA2843@gamayun \
    --to=iomartin@iomartin.net \
    --cc=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 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).