[ofa-general] Re: InfiniBand card (mthca) in Linux

Lukas Hejtmanek xhejtman at ics.muni.cz
Mon Jul 9 06:37:43 PDT 2007


On Sun, Jul 08, 2007 at 10:03:16PM -0700, Roland Dreier wrote:
> Is the memory given to a domU always physically contiguous?  If not,
> what happens when a domU kernel does alloc_pages(GFP_KERNEL, 6) to try
> and allocate 256 KB or something like that.  Let's assume that the
> domU kernel has enough guest contiguous pages to satisfy the
> allocation -- is there any guarantee that the pages are really
> physically contiguous?

The driver in Dom0 started to work fine. Do not know why. In DomU, using some
debug prints, I found that dma_coherent memory is OK (contiguous pages), but
alloc_pages returns contiguous pages but in the reverse order:

ib_mthca 0000:08:00.0: Alloc pages starts
ib_mthca 0000:08:00.0: Page phys. addr 0000000026695000, virt ffff880098b00000
ib_mthca 0000:08:00.0: Page phys. addr 0000000026694000, virt ffff880098b01000
ib_mthca 0000:08:00.0: Page phys. addr 0000000026693000, virt ffff880098b02000
ib_mthca 0000:08:00.0: Page phys. addr 0000000026692000, virt ffff880098b03000
ib_mthca 0000:08:00.0: Page phys. addr 0000000026691000, virt ffff880098b04000
ib_mthca 0000:08:00.0: Page phys. addr 0000000026690000, virt ffff880098b05000
ib_mthca 0000:08:00.0: Page phys. addr 000000002668f000, virt ffff880098b06000
ib_mthca 0000:08:00.0: Page phys. addr 000000002668e000, virt ffff880098b07000
ib_mthca 0000:08:00.0: Page phys. addr 000000002668d000, virt ffff880098b08000
ib_mthca 0000:08:00.0: Page phys. addr 000000002668c000, virt ffff880098b09000
ib_mthca 0000:08:00.0: Page phys. addr 000000002668b000, virt ffff880098b0a000
ib_mthca 0000:08:00.0: Page phys. addr 000000002668a000, virt ffff880098b0b000
ib_mthca 0000:08:00.0: Page phys. addr 0000000026689000, virt ffff880098b0c000
ib_mthca 0000:08:00.0: Page phys. addr 0000000026688000, virt ffff880098b0d000


-- 
Lukáš Hejtmánek



More information about the general mailing list