All of lore.kernel.org
 help / color / mirror / Atom feed
* MPOL_INTERLEAVE page-wise binding dump
@ 2011-12-22 17:12 Ananya Muddukrishna
  2011-12-22 19:58 ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Ananya Muddukrishna @ 2011-12-22 17:12 UTC (permalink / raw)
  To: linux-numa

Hi,

Is there an inexpensive way to determine 
which pages (virtual addresses) 
are bound to which NUMA nodes when 
using MPOL_INTERLEAVE or MPOL_BIND 
with a given set of nodes? 

I want to implement a strict 
round-robin based interleaving 
policy based on MPOL_INTERLEAVE. 

By strict I mean, 
there is no fall back and 
the system call returns an error 
if allocation fails on the given FIFO node set.

I am using numactl-2.0.8-rc3 on linux 2.6.32 
in a large server (4X12-core, 8 NUMA nodes) 
environment.

Please advise. Thank you.
- Ananya






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPOL_INTERLEAVE page-wise binding dump
  2011-12-22 17:12 MPOL_INTERLEAVE page-wise binding dump Ananya Muddukrishna
@ 2011-12-22 19:58 ` Andi Kleen
  2011-12-22 20:52   ` Ananya Muddukrishna
  2011-12-22 20:56   ` Ananya Muddukrishna
  0 siblings, 2 replies; 4+ messages in thread
From: Andi Kleen @ 2011-12-22 19:58 UTC (permalink / raw)
  To: Ananya Muddukrishna; +Cc: linux-numa

On Thu, Dec 22, 2011 at 05:12:41PM +0000, Ananya Muddukrishna wrote:
> Hi,
> 
> Is there an inexpensive way to determine 
> which pages (virtual addresses) 
> are bound to which NUMA nodes when 
> using MPOL_INTERLEAVE or MPOL_BIND 
> with a given set of nodes? 


get_mempolicy MPOL_F_ADDR|MPOL_F_NODE

> 
> I want to implement a strict 
> round-robin based interleaving 
> policy based on MPOL_INTERLEAVE. 

What's the rationale?


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPOL_INTERLEAVE page-wise binding dump
  2011-12-22 19:58 ` Andi Kleen
@ 2011-12-22 20:52   ` Ananya Muddukrishna
  2011-12-22 20:56   ` Ananya Muddukrishna
  1 sibling, 0 replies; 4+ messages in thread
From: Ananya Muddukrishna @ 2011-12-22 20:52 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-numa


Hi,

> On Thu, 22 Dec 2011 20:58:08 +0100
> Andi Kleen <andi@firstfloor.org> wrote:

> On Thu, Dec 22, 2011 at 05:12:41PM +0000, Ananya Muddukrishna wrote:
> > Hi,
> > 
> > Is there an inexpensive way to determine 
> > which pages (virtual addresses) 
> > are bound to which NUMA nodes when 
> > using MPOL_INTERLEAVE or MPOL_BIND 
> > with a given set of nodes? 
> 
> 
> get_mempolicy MPOL_F_ADDR|MPOL_F_NODE
> 

Thanks! I will check this out and get back. I hope this returns the
affinity as a page-to-node map.

> > 
> > I want to implement a strict 
> > round-robin based interleaving 
> > policy based on MPOL_INTERLEAVE. 
> 
> What's the rationale?

The rationale relates to scheduling tasks (OpenMP and the like) with
page affinity in a user-level runtime system (work-crew threading
model).

The runtime system allocates memory pages in a deterministic way using
mbind and from then on, schedules tasks such that accesses to task
operated pages (affinity) do not incur large NUMA overheads. I am
thinking of using mlock so that swapin_readahead does not affect the
affinity of runtime-allocated pages. The first-touch policy is not of
much help since the allocated memory is initialized before tasks are
scheduled. 

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

-- Ananya 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPOL_INTERLEAVE page-wise binding dump
  2011-12-22 19:58 ` Andi Kleen
  2011-12-22 20:52   ` Ananya Muddukrishna
@ 2011-12-22 20:56   ` Ananya Muddukrishna
  1 sibling, 0 replies; 4+ messages in thread
From: Ananya Muddukrishna @ 2011-12-22 20:56 UTC (permalink / raw)
  To: linux-numa


> > Is there an inexpensive way to determine 
> > which pages (virtual addresses) 
> > are bound to which NUMA nodes when 
> > using MPOL_INTERLEAVE or MPOL_BIND 
> > with a given set of nodes?   
> 
> 
> get_mempolicy MPOL_F_ADDR|MPOL_F_NODE
>   

Thanks! I will check this out and get back. I hope this returns the
affinity as a page-to-node map.

> > 
> > I want to implement a strict 
> > round-robin based interleaving 
> > policy based on MPOL_INTERLEAVE.   
> 
> What's the rationale?  

The rationale relates to scheduling tasks (OpenMP and the like) with
page affinity in a user-level runtime system (work-crew threading
model).

The runtime system allocates memory pages in a deterministic way using
mbind and from then on, schedules tasks such that accesses to task
operated pages (affinity) do not incur large NUMA overheads. I am
thinking of using mlock so that swapin_readahead does not affect the
affinity of runtime-allocated pages. The first-touch policy is not of
much help since the allocated memory is initialized before tasks are
scheduled. 

-- Ananya 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-22 20:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22 17:12 MPOL_INTERLEAVE page-wise binding dump Ananya Muddukrishna
2011-12-22 19:58 ` Andi Kleen
2011-12-22 20:52   ` Ananya Muddukrishna
2011-12-22 20:56   ` Ananya Muddukrishna

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.