We got a bit further with the DMA allocation, we know allocate a number of blocks of 4MB to transfer the data from the device.
The device allocates the dma memory on NUMA node 0 were zone DMA and zone DMA32 (x86_64) are located.
We use pci_alloc_consistent() to allocate a number of blocks of 4MB.
Our /proc/buddyinfo displays we don't have a zone NORMAl on node0.
Node 0, zone DMA 6 4 5 5 5 4 3 3 2 1 1
Node 0, zone DMA32 272 170 115 58 16 5 2 0 0 3 614
Node 1, zone Normal 388 281 157 73 12 3 0 5 2 4 656
We have a number of processes running on the other node (node 1) which does need to acces the dma-able memory
- QUESTION: how may we shrink zone DMA32 or influence how zones are mapped, we would like to have a part of zone NORMAL at node 0.
The process that runs on the other node needs to make use of the cache to get a reasonable performance
- QUESTION: how does pci_alloc_consistent set the cache settings of the memory, will this not be cached, or does it guarantee that the cache is synced?
- QUESTION: the device only transfers data from the device to the kernel, is pci_alloc_consisten the way to go or could we better use pci_map_single to set the
direction and then use pci_dma_sync_single() to sync the cache manually.
Hope my questions are clear,
Thanks in advance,