* how to get a DMA channel near a process?
@ 2009-08-25 13:05 Brice Goglin
2009-08-26 5:18 ` Robert Hancock
2009-08-26 6:10 ` Dan Williams
0 siblings, 2 replies; 4+ messages in thread
From: Brice Goglin @ 2009-08-25 13:05 UTC (permalink / raw)
To: Dan Williams, Maciej Sosnowski, LKML
Hello,
I am playing with DMA engine on a Nehalem box with two X58 chipsets
(Supermicro X8DAH). My understanding is that there are 8 DMA channels on
each chipset, so 8 channels near each processor. Unfortunately, my BIOS
and 2.6.31-rc still wrongly reports the physical location of my devices
(it claims all PCI devices are near the first processor) but I worked
around the problem manually.
The offloaded copy performance changes a lot depending on whether the
process memory is allocated near the DMA device. So first I would like
to know if DMA channels are allocated near the requesting
processor/process. Then I guess it's possible to read the cpu mask near
a given chan by following chan->dev.device up to the pci device, right?
But is there any way to request a DMA channel near a specific socket or
NUMA node or cpu mask?
Thanks,
Brice
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to get a DMA channel near a process?
2009-08-25 13:05 how to get a DMA channel near a process? Brice Goglin
@ 2009-08-26 5:18 ` Robert Hancock
2009-08-26 5:32 ` Brice Goglin
2009-08-26 6:10 ` Dan Williams
1 sibling, 1 reply; 4+ messages in thread
From: Robert Hancock @ 2009-08-26 5:18 UTC (permalink / raw)
To: Brice Goglin; +Cc: Dan Williams, Maciej Sosnowski, LKML
On 08/25/2009 07:05 AM, Brice Goglin wrote:
> Hello,
>
> I am playing with DMA engine on a Nehalem box with two X58 chipsets
> (Supermicro X8DAH). My understanding is that there are 8 DMA channels on
> each chipset, so 8 channels near each processor. Unfortunately, my BIOS
Don't think that DMA channel is the term you are looking for, maybe PCI
Express lanes? DMA channels are an ancient ISA thing.
> and 2.6.31-rc still wrongly reports the physical location of my devices
> (it claims all PCI devices are near the first processor) but I worked
> around the problem manually.
Presumably incorrect information in the BIOS tables (SLIT or MADT, maybe?)
>
> The offloaded copy performance changes a lot depending on whether the
> process memory is allocated near the DMA device. So first I would like
> to know if DMA channels are allocated near the requesting
> processor/process. Then I guess it's possible to read the cpu mask near
Not sure quite what you are trying to say here. Normally when memory is
allocated for DMA use for a specific device I believe the kernel tries
to allocate it on the same node that the device is attached to.
> a given chan by following chan->dev.device up to the pci device, right?
> But is there any way to request a DMA channel near a specific socket or
> NUMA node or cpu mask?
>
> Thanks,
> Brice
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to get a DMA channel near a process?
2009-08-26 5:18 ` Robert Hancock
@ 2009-08-26 5:32 ` Brice Goglin
0 siblings, 0 replies; 4+ messages in thread
From: Brice Goglin @ 2009-08-26 5:32 UTC (permalink / raw)
To: Robert Hancock; +Cc: Dan Williams, Maciej Sosnowski, LKML
Robert Hancock wrote:
> On 08/25/2009 07:05 AM, Brice Goglin wrote:
>> Hello,
>>
>> I am playing with DMA engine on a Nehalem box with two X58 chipsets
>> (Supermicro X8DAH). My understanding is that there are 8 DMA channels on
>> each chipset, so 8 channels near each processor. Unfortunately, my BIOS
>
> Don't think that DMA channel is the term you are looking for, maybe
> PCI Express lanes? DMA channels are an ancient ISA thing.
Talking about DMA Engine devices/channels such as Intel I/OAT. See
include/linux/dmaengine.h
Brice
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to get a DMA channel near a process?
2009-08-25 13:05 how to get a DMA channel near a process? Brice Goglin
2009-08-26 5:18 ` Robert Hancock
@ 2009-08-26 6:10 ` Dan Williams
1 sibling, 0 replies; 4+ messages in thread
From: Dan Williams @ 2009-08-26 6:10 UTC (permalink / raw)
To: Brice Goglin; +Cc: Maciej Sosnowski, LKML
On Tue, Aug 25, 2009 at 6:05 AM, Brice Goglin<Brice.Goglin@inria.fr> wrote:
> Hello,
>
> I am playing with DMA engine on a Nehalem box with two X58 chipsets
> (Supermicro X8DAH). My understanding is that there are 8 DMA channels on
> each chipset, so 8 channels near each processor. Unfortunately, my BIOS
> and 2.6.31-rc still wrongly reports the physical location of my devices
> (it claims all PCI devices are near the first processor) but I worked
> around the problem manually.
>
> The offloaded copy performance changes a lot depending on whether the
> process memory is allocated near the DMA device. So first I would like
> to know if DMA channels are allocated near the requesting
> processor/process. Then I guess it's possible to read the cpu mask near
> a given chan by following chan->dev.device up to the pci device, right?
> But is there any way to request a DMA channel near a specific socket or
> NUMA node or cpu mask?
If we can determine the topology of which chipset is closer to which
cpu package then we can modify the dmaengine channel_table to return
"local" channels via dma_find_channel(). The current allocation
policy is blind per-cpu round robin such that cpu-0 gets channel-0,
cpu-1 gets channel-1... As you pointed out the challenge will be
finding a reliable source for the topology information.
--
Dan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-26 6:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 13:05 how to get a DMA channel near a process? Brice Goglin
2009-08-26 5:18 ` Robert Hancock
2009-08-26 5:32 ` Brice Goglin
2009-08-26 6:10 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox