linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Memory policy question for NUMA arch....
@ 2010-04-20 20:34 Chetan Loke
  0 siblings, 0 replies; 10+ messages in thread
From: Chetan Loke @ 2010-04-20 20:34 UTC (permalink / raw)
  To: Lee Schermerhorn; +Cc: rick.sherm, andi, linux-numa, linux-kernel

Lee,

--- On Mon, 4/19/10, Lee Schermerhorn <Lee.Schermerhorn@hp.com> wrote:
> You should never change the system default once the system
> is up and
> running.
> 

Not sure what I was thinking.Agreed, we should leave the default-policy alone.

> Still not clear on what your requirements are 

Thanks for pointing me to the other post. I might have a similar problem.I've a nehalem box.

1) Drivers supports MSI-X.
  1.1) Drivers at load time allocate a chunk of DMA'able memory.
   
2) Sometime later, after the OS boots, I need to load my apps.

3) Now, the apps and the drivers communicate via a mmap'd region.

I need a deterministic way of allocating memory depending on my needs(interleave or localalloc).So I can't be at the mercy of either 'current' or 'global-policy' or anyone else.Also, why reference 'current' to begin with? And everytime I reference 'current' from within my driver, current points to 'work_for_cpu' kthread. So that clearly doesn't help.

> A device-centric interface--e.g.,
> 'get_free_pages_dev()'--could get the
> device/bus node affinity via dev_to_node() and then do the
> allocation/conversion.   I think this is
> close to what you're suggesting
> above. See dma_generic_alloc_coherent() [in
> arch/x86/kernel/pci-dma.c]
> for an example of a wrapper that does the device affinity
> lookup and
> allocation in one function.
> 

> Of course, you could just do this in your driver, as well.
> 
Very helpful thanks.I will mimic 'dma_generic_alloc_coherent' in my driver when I need local-node memory.


> > Also, is there a way to configure irqbalance and ask
> it to leave these
> > guys alone? Like a config file that says - leave
> these
> > irqs/pci-devices alone.For now I've shut down
> irqbalance.
> 
> You can set the environment variable
> IRQBALANCE_BANNED_INTERRUPTS--when
> starting irqbalance--to list of interrupts that irqbalance
> should ignore
> if you're using a version that supports that.  Check
> the init script
> that starts irqbalance on your distro of choice.
> 
aaaah...mine is old and I could see IRQBALANCE_BANNED_CPUS and not _INTERRUPTS.I will upgrade it.

> Regards,
> Lee

Thanks
Chetan Loke



      


^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <524835.89860.qm@web114303.mail.gq1.yahoo.com>]
* Memory policy question for NUMA arch....
@ 2010-04-06 19:29 Rick Sherm
  0 siblings, 0 replies; 10+ messages in thread
From: Rick Sherm @ 2010-04-06 19:29 UTC (permalink / raw)
  To: linux-kernel

Hello,

On a NUMA host, if a driver calls __get_free_pages() then it will eventually invoke ->alloc_pages_current(..). The comment above/within alloc_pages_current() says 'current->mempolicy' will be used.So what memory policy will kick-in if the driver is trying to allocate some memory blocks during driver load time(say from probe_one)? System-wide default policy,correct?

What if the driver wishes to i) stay confined to a 'cpulist' OR ii) use a different mem-policy? How do I achieve this?
I will choose the 'cpulist' after I am successfuly able to affinitize the MSI-X vectors.

regards
Rick


      

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

end of thread, other threads:[~2010-04-20 20:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <243351.5510.qm@web111910.mail.gq1.yahoo.com>
2010-04-16 23:17 ` Memory policy question for NUMA arch Chetan Loke
2010-04-17  6:35   ` Andi Kleen
2010-04-17 14:59     ` Chetan Loke
2010-04-17 19:30       ` Andi Kleen
2010-04-19 15:16   ` Lee Schermerhorn
2010-04-20 20:34 Chetan Loke
     [not found] <524835.89860.qm@web114303.mail.gq1.yahoo.com>
2010-04-07  9:00 ` Andi Kleen
2010-04-07 15:48   ` Rick Sherm
2010-04-07 17:27     ` Lee Schermerhorn
  -- strict thread matches above, loose matches on Subject: below --
2010-04-06 19:29 Rick Sherm

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