RE: Memory policy question for NUMA arch....

Chetan Loke <[email protected]>
Newsgroups org.kernel.vger.linux-numa,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Lee,

--- On Mon, 4/19/10, Lee Schermerhorn <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.