All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@darnok.org>
To: "Taylor, Neal E" <Neal.Taylor@ca.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
	"Kalev, Leonid" <Leonid.Kalev@ca.com>,
	"Dave, Tushar N" <tushar.n.dave@intel.com>
Subject: Re: Buffers not reachable by PCI
Date: Tue, 13 Dec 2011 18:28:00 -0500	[thread overview]
Message-ID: <20111213232759.GA8702@konrad-lan> (raw)
In-Reply-To: <3E243B26F475504B9BB0BCC9728B0DA629E184FA@USILMS110A.ca.com>

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.

  reply	other threads:[~2011-12-13 23:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09 20:19 Buffers not reachable by PCI Taylor, Neal E
2011-12-09 20:30 ` Konrad Rzeszutek Wilk
2011-12-12 22:11   ` Taylor, Neal E
2011-12-13  0:19     ` Konrad Rzeszutek Wilk
2011-12-13 19:34       ` Taylor, Neal E
2011-12-13 22:17       ` Taylor, Neal E
2011-12-13 23:28         ` Konrad Rzeszutek Wilk [this message]
2011-12-14  0:38           ` Taylor, Neal E
2011-12-14  9:20             ` Jan Beulich
2011-12-14 16:42               ` Taylor, Neal E
2011-12-14 18:42                 ` Kalev, Leonid
2011-12-15  1:59                   ` Konrad Rzeszutek Wilk
2011-12-15  2:19                     ` Taylor, Neal E
2011-12-15  2:29                       ` Konrad Rzeszutek Wilk
2011-12-15  2:40                         ` Taylor, Neal E
2011-12-15 16:12                           ` Konrad Rzeszutek Wilk
2011-12-15 16:14                             ` Taylor, Neal E
2011-12-15  2:16                   ` Taylor, Neal E
2011-12-14 19:11               ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111213232759.GA8702@konrad-lan \
    --to=konrad@darnok.org \
    --cc=Leonid.Kalev@ca.com \
    --cc=Neal.Taylor@ca.com \
    --cc=tushar.n.dave@intel.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.