All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: James Harper <james@ejbdigital.com.au>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: pci adapter not working in dom0. works under plain Linux.
Date: Tue, 10 Jun 2014 09:08:32 -0400	[thread overview]
Message-ID: <20140610130832.GC28932@laptop.dumpdata.com> (raw)
In-Reply-To: <c75af177d6b44bdb85bd3e8d396848ca@SIXPR04MB304.apcprd04.prod.outlook.com>

On Tue, Jun 10, 2014 at 11:19:18AM +0000, James Harper wrote:
> > 
> > On Sun, Jun 08, 2014 at 11:01:25AM +0000, James Harper wrote:
> > > I bought an unsupported DVB card (by mistake - I bought the v2 version
> > instead of the supported v1 version), and I've just finished getting it working
> > under Linux, but spent the last day or so trying to figure out why it keeps
> > dropping buffers even though the reception is perfect. As soon as I noticed
> > that the lost data is always in PAGE_SIZE multiples, I figured I'd better boot in
> > plain Linux instead of Xen, and when I did that it worked perfectly.
> > 
> > What happens if you boot dom0 with 'dom0_mem=max:1G' and limit the
> > amount of memory
> > Xen sees by using 'mem=4G' on the Xen command line?
> > 
> 
> That seems to make the problem go away. The machine itself has 5GB of memory in it, so (assuming an even spread) only 1/5 of allocations would come from >4GB memory right? This matches the missing pages of data in the resulting DMA transfers.

That was my theory.
> 
> Where should I start looking for the fix? The card is PCIe so I would have thought it would have supported DMA to memory > 4GB, is that the problem? I think one of my USB devices has the same problem too.

Ugh. They all should do the right job - that is using the DMA API.
> 
> Btw, what is dom0_mem=max:1G supposed to do? Dom0 still has ~3.7GB memory allocated to it on boot.

Oh, I think I mentioned that it should have been on the 'dom0' line but
I meant Xen line.

If you try removing the 'mem=4G' and just use 'dom0_mem=max:1G' please?
That should limit the amount of memory the dom0 uses (it sees the
rest of the E820 - but does not use it) - and that means that the
drivers should _also_ use said below memory.

I had some preliminary patches for the V4L API to use a better
DMA ops, but I fear that they are bitrotten (and I can't even
find them!). But lets try first determine if the workarounds
work for you.
> 
> Thanks!
> 
> James

  reply	other threads:[~2014-06-10 13:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-08 11:01 pci adapter not working in dom0. works under plain Linux James Harper
2014-06-09 16:51 ` Konrad Rzeszutek Wilk
2014-06-10 11:19   ` James Harper
2014-06-10 13:08     ` Konrad Rzeszutek Wilk [this message]
2014-06-10 13:41       ` James Harper
2014-06-10 14:00         ` James Harper
2014-06-10 14:26           ` Jan Beulich
2014-06-10 15:05       ` Sander Eikelenboom
2014-06-11 11:53         ` James Harper
2014-06-11 12:12           ` Sander Eikelenboom
2014-06-11 13:47             ` Konrad Rzeszutek Wilk
2014-06-11 14:50               ` Sander Eikelenboom

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=20140610130832.GC28932@laptop.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=james@ejbdigital.com.au \
    --cc=xen-devel@lists.xen.org \
    /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.