[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Buffers not reachable by PCI


  • To: Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx>
  • From: "Taylor, Neal E" <Neal.Taylor@xxxxxx>
  • Date: Wed, 14 Dec 2011 00:38:09 +0000
  • Accept-language: en-US
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Kalev, Leonid" <Leonid.Kalev@xxxxxx>, "Dave, Tushar N" <tushar.n.dave@xxxxxxxxx>
  • Delivery-date: Wed, 14 Dec 2011 00:39:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acy2r+Ulg1PsfbmtTl6QVj0jZAx7mwAK1xcAAIXl/sAAGPmvgAAhEiCwAA9ukQAACILlsA==
  • Thread-topic: [Xen-devel] Buffers not reachable by PCI

Instrumentation results:

[    0.000000] MFN 0x1c0->0x1c0
[    0.000000] MFN 0x1ff->0x180
[    0.000000] MFN 0x1bf->0x140
[    0.000000] MFN 0x17f->0x100
[    0.000000] MFN 0x13f->0x3c0
[    0.000000] MFN 0x3ff->0x380
[    0.000000] MFN 0x3bf->0x340
[    0.000000] MFN 0x37f->0x300
[    0.000000] MFN 0x33f->0x2c0
[    0.000000] MFN 0x2ff->0x280
[    0.000000] MFN 0x2bf->0x240
[    0.000000] MFN 0x27f->0x200
[    0.000000] MFN 0x23f->0x7c0
[    0.000000] MFN 0x7ff->0x780
[    0.000000] MFN 0x7bf->0x740
[    0.000000] MFN 0x77f->0x700
[    0.000000] MFN 0x73f->0x6c0
[    0.000000] MFN 0x6ff->0x680
[    0.000000] MFN 0x6bf->0x640
[    0.000000] MFN 0x67f->0x600
[    0.000000] MFN 0x63f->0x5c0
[    0.000000] MFN 0x5ff->0x580
[    0.000000] MFN 0x5bf->0x540
[    0.000000] MFN 0x57f->0x500
[    0.000000] MFN 0x53f->0x4c0
[    0.000000] MFN 0x4ff->0x480
[    0.000000] MFN 0x4bf->0x440
[    0.000000] MFN 0x47f->0x400
[    0.000000] MFN 0x43f->0xfc0
[    0.000000] MFN 0xfff->0xf80
[    0.000000] MFN 0xfbf->0xf40
[    0.000000] MFN 0xf7f->0xf00
[    0.000000] MFN 0xf3f->0xec0
[    0.000000] MFN 0xeff->0xe80
[    0.000000] MFN 0xebf->0xe40
[    0.000000] MFN 0xe7f->0xe00
[    0.000000] MFN 0xe3f->0xdc0
[    0.000000] MFN 0xdff->0xd80
[    0.000000] MFN 0xdbf->0xd40
[    0.000000] MFN 0xd7f->0xd00
[    0.000000] MFN 0xd3f->0xcc0
[    0.000000] MFN 0xcff->0xc80
[    0.000000] MFN 0xcbf->0xc40
[    0.000000] MFN 0xc7f->0xc00
[    0.000000] MFN 0xc3f->0xbc0
[    0.000000] MFN 0xbff->0xb80
[    0.000000] MFN 0xbbf->0xb40
[    0.000000] MFN 0xb7f->0xb00
[    0.000000] MFN 0xb3f->0xac0
[    0.000000] MFN 0xaff->0xa80
[    0.000000] MFN 0xabf->0xa40
[    0.000000] MFN 0xa7f->0xa00
[    0.000000] MFN 0xa3f->0x9c0
[    0.000000] MFN 0x9ff->0x980
[    0.000000] MFN 0x9bf->0x940
[    0.000000] MFN 0x97f->0x900
[    0.000000] MFN 0x93f->0x8c0
[    0.000000] MFN 0x8ff->0x880
[    0.000000] MFN 0x8bf->0x840
[    0.000000] MFN 0x87f->0x800
[    0.000000] MFN 0x83f->0x1fc0
[    0.000000] MFN 0x1fff->0x1f80
[    0.000000] MFN 0x1fbf->0x1f40
[    0.000000] MFN 0x1f7f->0x1f00
[    0.000000] MFN 0x1f3f->0x1ec0
[    0.000000] MFN 0x1eff->0x1e80
[    0.000000] MFN 0x1ebf->0x1e40
[    0.000000] MFN 0x1e7f->0x1e00
[    0.000000] MFN 0x1e3f->0x1dc0
[    0.000000] MFN 0x1dff->0x1d80
[    0.000000] MFN 0x1dbf->0x1d40
[    0.000000] MFN 0x1d7f->0x1d00
[    0.000000] MFN 0x1d3f->0x1cc0
[    0.000000] MFN 0x1cff->0x1c80
[    0.000000] MFN 0x1cbf->0x1c40
[    0.000000] MFN 0x1c7f->0x1c00
[    0.000000] MFN 0x1c3f->0x1bc0
[    0.000000] MFN 0x1bff->0x1b80
[    0.000000] MFN 0x1bbf->0x1b40
[    0.000000] MFN 0x1b7f->0x1b00
[    0.000000] MFN 0x1b3f->0x1ac0
[    0.000000] MFN 0x1aff->0x1a80
[    0.000000] MFN 0x1abf->0x1a40
[    0.000000] MFN 0x1a7f->0x1a00
[    0.000000] MFN 0x1a3f->0x19c0
[    0.000000] MFN 0x19ff->0x1980
[    0.000000] MFN 0x19bf->0x1940
[    0.000000] MFN 0x197f->0x1900
[    0.000000] MFN 0x193f->0x18c0
[    0.000000] MFN 0x18ff->0x1880
[    0.000000] MFN 0x18bf->0x1840
[    0.000000] MFN 0x187f->0x1800
[    0.000000] MFN 0x183f->0x17c0
[    0.000000] MFN 0x17ff->0x1780
[    0.000000] MFN 0x17bf->0x1740
[    0.000000] MFN 0x177f->0x1700
[    0.000000] MFN 0x173f->0x16c0
[    0.000000] MFN 0x16ff->0x1680
[    0.000000] MFN 0x16bf->0x1640
[    0.000000] MFN 0x167f->0x1600
[    0.000000] MFN 0x163f->0x15c0
[    0.000000] MFN 0x15ff->0x1580
[    0.000000] MFN 0x15bf->0x1540
[    0.000000] MFN 0x157f->0x1500
[    0.000000] MFN 0x153f->0x14c0
[    0.000000] MFN 0x14ff->0x1480
[    0.000000] MFN 0x14bf->0x1440
[    0.000000] MFN 0x147f->0x1400
[    0.000000] MFN 0x143f->0x13c0
[    0.000000] MFN 0x13ff->0x1380
[    0.000000] MFN 0x13bf->0x1340
[    0.000000] MFN 0x137f->0x1300
[    0.000000] MFN 0x133f->0x12c0
[    0.000000] MFN 0x12ff->0x1280
[    0.000000] MFN 0x12bf->0x1240
[    0.000000] MFN 0x127f->0x1200
[    0.000000] MFN 0x123f->0x11c0
[    0.000000] MFN 0x11ff->0x1180
[    0.000000] MFN 0x11bf->0x1140
[    0.000000] MFN 0x117f->0x1100
[    0.000000] MFN 0x113f->0x10c0
[    0.000000] MFN 0x10ff->0x1080
[    0.000000] MFN 0x10bf->0x1040
[    0.000000] MFN 0x107f->0x1000
[    0.000000] MFN 0x103f->0x3fc0
[    0.000000] MFN 0x3fff->0x3f80
[    0.000000] MFN 0x3fbf->0x3f40
[    0.000000] MFN 0x3f7f->0x3f00
[    0.000000] MFN 0x3f3f->0x3ec0
[    0.000000] MFN 0x3eff->0x3e80
[    0.000000] MFN 0x3ebf->0x3e40
[    0.000000] MFN 0x3e7f->0x3e00
[    0.000000] MFN 0x3e3f->0x3dc0
[    0.000000] MFN 0x3dff->0x3d80
[    0.000000] MFN 0x3dbf->0x3d40
[    0.000000] MFN 0x3d7f->0x3d00
[    0.000000] MFN 0x3d3f->0x3cc0
[    0.000000] MFN 0x3cff->0x3c80
[    0.000000] MFN 0x3cbf->0x3c40
[    0.000000] MFN 0x3c7f->0x3c00
[    0.000000] MFN 0x3c3f->0x3bc0
[    0.000000] MFN 0x3bff->0x3b80
[    0.000000] MFN 0x3bbf->0x3b40
[    0.000000] MFN 0x3b7f->0x3b00
[    0.000000] MFN 0x3b3f->0x3ac0
[    0.000000] MFN 0x3aff->0x3a80
[    0.000000] MFN 0x3abf->0x3a40
[    0.000000] MFN 0x3a7f->0x3a00
[    0.000000] MFN 0x3a3f->0x39c0
[    0.000000] MFN 0x39ff->0x3980
[    0.000000] MFN 0x39bf->0x3940
[    0.000000] MFN 0x397f->0x3900
[    0.000000] MFN 0x393f->0x38c0
[    0.000000] MFN 0x38ff->0x3880
[    0.000000] MFN 0x38bf->0x3840
[    0.000000] MFN 0x387f->0x3800
[    0.000000] MFN 0x383f->0x37c0
[    0.000000] MFN 0x37ff->0x3780
[    0.000000] MFN 0x37bf->0x3740
[    0.000000] MFN 0x377f->0x3700
[    0.000000] MFN 0x373f->0x36c0
[    0.000000] MFN 0x36ff->0x3680
[    0.000000] MFN 0x36bf->0x3640
[    0.000000] MFN 0x367f->0x3600
[    0.000000] MFN 0x363f->0x35c0
[    0.000000] MFN 0x35ff->0x3580
[    0.000000] MFN 0x35bf->0x3540
[    0.000000] MFN 0x357f->0x3500
[    0.000000] MFN 0x353f->0x34c0
[    0.000000] MFN 0x34ff->0x3480
[    0.000000] MFN 0x34bf->0x3440
[    0.000000] MFN 0x347f->0x3400
[    0.000000] MFN 0x343f->0x33c0
[    0.000000] MFN 0x33ff->0x3380
[    0.000000] MFN 0x33bf->0x3340
[    0.000000] MFN 0x337f->0x3300
[    0.000000] MFN 0x333f->0x32c0
[    0.000000] MFN 0x32ff->0x3280
[    0.000000] MFN 0x32bf->0x3240
[    0.000000] MFN 0x327f->0x3200
[    0.000000] MFN 0x323f->0x31c0
[    0.000000] MFN 0x31ff->0x3180
[    0.000000] MFN 0x31bf->0x3140
[    0.000000] MFN 0x317f->0x3100
[    0.000000] MFN 0x313f->0x30c0
[    0.000000] MFN 0x30ff->0x3080
[    0.000000] MFN 0x30bf->0x3040
[    0.000000] MFN 0x307f->0x3000
[    0.000000] MFN 0x303f->0x2fc0
[    0.000000] MFN 0x2fff->0x2f80
[    0.000000] MFN 0x2fbf->0x2f40
[    0.000000] MFN 0x2f7f->0x2f00
[    0.000000] MFN 0x2f3f->0x2ec0
[    0.000000] MFN 0x2eff->0x2e80
[    0.000000] MFN 0x2ebf->0x2e40
[    0.000000] MFN 0x2e7f->0x2e00
[    0.000000] MFN 0x2e3f->0x2dc0
[    0.000000] MFN 0x2dff->0x2d80
[    0.000000] MFN 0x2dbf->0x2d40
[    0.000000] MFN 0x2d7f->0x2d00
[    0.000000] MFN 0x2d3f->0x2cc0
[    0.000000] MFN 0x2cff->0x2c80
[    0.000000] MFN 0x2cbf->0x2c40
[    0.000000] MFN 0x2c7f->0x2c00
[    0.000000] MFN 0x2c3f->0x2bc0
[    0.000000] MFN 0x2bff->0x2b80
[    0.000000] MFN 0x2bbf->0x2b40
[    0.000000] MFN 0x2b7f->0x2b00
[    0.000000] MFN 0x2b3f->0x2ac0
[    0.000000] MFN 0x2aff->0x2a80
[    0.000000] MFN 0x2abf->0x2a40
[    0.000000] MFN 0x2a7f->0x2a00
[    0.000000] MFN 0x2a3f->0x29c0
[    0.000000] MFN 0x29ff->0x2980
[    0.000000] MFN 0x29bf->0x2940
[    0.000000] MFN 0x297f->0x2900
[    0.000000] MFN 0x293f->0x28c0
[    0.000000] MFN 0x28ff->0x2880
[    0.000000] MFN 0x28bf->0x2840
[    0.000000] MFN 0x287f->0x2800
[    0.000000] MFN 0x283f->0x27c0
[    0.000000] MFN 0x27ff->0x2780
[    0.000000] MFN 0x27bf->0x2740
[    0.000000] MFN 0x277f->0x2700
[    0.000000] MFN 0x273f->0x26c0
[    0.000000] MFN 0x26ff->0x2680
[    0.000000] MFN 0x26bf->0x2640
[    0.000000] MFN 0x267f->0x2600
[    0.000000] MFN 0x263f->0x25c0
[    0.000000] MFN 0x25ff->0x2580
[    0.000000] MFN 0x25bf->0x2540
[    0.000000] MFN 0x257f->0x2500
[    0.000000] MFN 0x253f->0x24c0
[    0.000000] MFN 0x24ff->0x2480
[    0.000000] MFN 0x24bf->0x2440
[    0.000000] MFN 0x247f->0x2400
[    0.000000] MFN 0x243f->0x23c0
[    0.000000] MFN 0x23ff->0x2380
[    0.000000] MFN 0x23bf->0x2340
[    0.000000] MFN 0x237f->0x2300
[    0.000000] MFN 0x233f->0x22c0
[    0.000000] MFN 0x22ff->0x2280
[    0.000000] MFN 0x22bf->0x2240
[    0.000000] MFN 0x227f->0x2200
[    0.000000] MFN 0x223f->0x21c0
[    0.000000] MFN 0x21ff->0x2180
[    0.000000] MFN 0x21bf->0x2140
[    0.000000] MFN 0x217f->0x2100
[    0.000000] MFN 0x213f->0x20c0
[    0.000000] MFN 0x20ff->0x2080
[    0.000000] MFN 0x20bf->0x2040
[    0.000000] MFN 0x207f->0x2000
[    0.000000] MFN 0x203f->0x7fc0
[    0.000000] MFN 0x7fff->0x7f80
[    0.000000] MFN 0x7fbf->0x7f40
[    0.000000] MFN 0x7f7f->0x7f00
[    0.000000] Placing 64MB software IO TLB between d832cf00 - dc32cf00
[    0.000000] software IO TLB at phys 0x1832cf00 - 0x1c32cf00
[    0.000000] software IO TLB at bus 0x1c0f00 - 0x120fdff00
[    0.000000] Initializing HighMem for node 0 (000373fe:001dffc0)
[    0.000000] Memory: 384804k/7864064k available (2338k kernel code, 139036k 
reserved, 1197k data, 372k init, 0k highmem)

Actual code in xen_swiotlb_init after xen_swiotlb_fixup call:

        {
                phys_addr_t pstart, pend;
                unsigned long mfn, next_mfn;
                int i;

                pstart = virt_to_phys(xen_io_tlb_start);
                pend = virt_to_phys(xen_io_tlb_end);

                mfn= PFN_DOWN(phys_to_machine(XPADDR(pstart)).maddr);

                for (i = pstart; i < pend;) {
                        next_mfn = PFN_DOWN(phys_to_machine(XPADDR(i)).maddr);
                        if (next_mfn == mfn+1) {
                                mfn++;
                        } else {
                                printk(KERN_INFO "MFN 0x%lx->0x%lx\n", mfn, 
next_mfn);
                                mfn = next_mfn;
                        }
                i+=PAGE_SIZE;
                }

        }

We're not getting so far along as to be running xend yet. That normally gets 
started remotely and without networks it doesn't happen. I can probably do that 
tomorrow.

-----Original Message-----
From: Konrad Rzeszutek Wilk [mailto:konrad.r.wilk@xxxxxxxxx] On Behalf Of 
Konrad Rzeszutek Wilk
Sent: Tuesday, December 13, 2011 3:28 PM
To: Taylor, Neal E
Cc: xen-devel; Kalev, Leonid; Dave, Tushar N
Subject: Re: [Xen-devel] Buffers not reachable by PCI

On Tue, Dec 13, 2011 at 10:17:50PM +0000, Taylor, Neal E wrote:
> 
> Is it the translation that's in error?
> 
> Modeled after the translation in xen_swiotlb_dma_supported that's used for 
> the problematic comparison, I added "the same" translation to swiotlb_print. 
> I don't understand the results as dend - dstart is vastly larger that pend - 
> pstart.

You might want to instrument the xen_swiotlb_fixup code to get an idea.

But basically there are "chunks" of 2MB (I think) of contingous memory
that is swizzled in to the memory that starts at io_tlb_start. But
all of that memory SHOULD be under the 4GB limit (set by max_dma_bits).

Sadly in your case one of those "chunks" ends up being past the 4GB
limit - which should never happen. Or if it did happen it would print
out "Failed to get contiguous memory for DMA from.."

But you don't get any of that.


To get a good idea of this, you could do something like this

unsigned long mfn, next_mfn;

mfn= PFN_DOWN(phys_to_machine(XPADDR(pstart)).maddr);

for (i = pstart; i < pend;) {
        next_mfn = PFN_DOWN(phys_to_machine(XPADDR(i)).maddr);
        if (next_mfn == mfn+1) {
                mfn++;
        } else {
                printk(KERN_INFO "MFN 0x%lx->0x%lx\n", mfn, next_mfn);
                mfn = next_mfn;
        }
        i+=PAGE_SIZE;
}

which should print you those "chunks", if my logic here is right.


Can you send me your 'xl info' (or 'xl dmesg'), please?

I tried to reproduce this with a 3.0.4 kernel on a 8GB and I couldn't
reproduce this. Hm, will look in your .config in case there is something
funky there.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.