From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ananya Muddukrishna Subject: Re: MPOL_INTERLEAVE page-wise binding dump Date: Thu, 22 Dec 2011 21:52:03 +0100 Message-ID: <20111222215203.5657d16f@aniX201> References: <20111222195808.GE11715@one.firstfloor.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111222195808.GE11715@one.firstfloor.org> Sender: linux-numa-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Andi Kleen Cc: linux-numa@vger.kernel.org Hi, > On Thu, 22 Dec 2011 20:58:08 +0100 > Andi Kleen 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