From: Joanna Rutkowska <joanna@invisiblethingslab.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>,
xen-devel@lists.xensource.com,
Rafal Wojtczuk <rafal@invisiblethingslab.com>,
Jan Beulich <JBeulich@novell.com>
Subject: Re: Assigning contiguous memory to a driver domain
Date: Tue, 21 Sep 2010 13:28:30 +0200 [thread overview]
Message-ID: <4C9896DE.4020803@invisiblethingslab.com> (raw)
In-Reply-To: <20100920194836.GA25803@dumpdata.com>
[-- Attachment #1.1: Type: text/plain, Size: 2291 bytes --]
On 09/20/10 21:48, Konrad Rzeszutek Wilk wrote:
>>> If so, it requires nonzero Xen free memory ? And that is why when I do
>>> "ifconfig eth0 down; ifconfig eth0 up" in the driver domain the second one
>>> fails ?
>
> There are couple of things happening when you do ifconfig eth0 up. The
> PTE used for virtual address for the BARs are updated with the _PAGE_IOMAP
> which means that the GMFN->PFN->MFN is shortcircuited to be GMFN->MFN.
> Obviously that doesn' use any Xen heap memory. The next thing is
> that the the driver might allocate coherent DMA mappings. Those are the
> ones I think Jan is referring to. For coherent DMA mappings we just
> do page_alloc and then we swap the memory behind those pages with Xen
> to be under the 32-bit limit (xen_create_contiguous_region).
> Naturally when the driver is unloaded the de-allocation will call
> xen_destroy_contiguous_region. Loking at the code I think it swaps with
> the highest bit order (so with memory close to the end of physical space).
>
>
A coherent DMA mapping == continues mfns, right?
So, is there a way to assure that this page_alloc for coherent DMA
mapping *always* succeeds for a given domain, assuming it succeeded at
least once (at its startup)?
>>
>> Generally the second "up" shouldn't fail as long as the prior "down"
>> properly returned all resources. See the restrictions above.
>
> Yeah, it might be worth looking at what it is doing to cause this. The e1000/igb
> are pretty good at cleaning everying so you can do ifup;ifdown indefinitly.
>
But if they are so good at cleaning everything as you say, then wouldn't
that mean they are giving back the continues mfns back to Xen, which
makes it possible that they will no longer be available when we do ifup
next time (because e.g. some other drv domain will use them this time)?
> In reference to the Xen-SWIOTLB for other versions that upstream, there are a couple
> of implementations at:
> git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6.git
>
> for different Linux versions. Which version of kernel do you guys use?
We use 2.6.34.1 with OpenSuse xenlinux pacthes (sorry guys, we decided
to switch to xenlinux some time ago for better suspend and DRM).
Thanks,
joanna.
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 518 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-09-21 11:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-14 9:24 Assigning contiguous memory to a driver domain Rafal Wojtczuk
2010-09-14 9:36 ` Jan Beulich
2010-09-15 9:08 ` Rafal Wojtczuk
2010-09-15 9:39 ` Rafal Wojtczuk
2010-09-15 9:50 ` Jan Beulich
2010-09-15 10:42 ` Joanna Rutkowska
2010-09-15 10:59 ` Jan Beulich
2010-09-15 11:07 ` Joanna Rutkowska
2010-09-15 11:50 ` Jan Beulich
2010-09-15 11:58 ` Goswin von Brederlow
2010-09-15 12:06 ` Rafal Wojtczuk
2010-09-15 13:49 ` Jan Beulich
2010-09-15 14:44 ` Rafal Wojtczuk
2010-09-15 15:29 ` Jan Beulich
2010-09-20 19:48 ` Konrad Rzeszutek Wilk
2010-09-20 20:27 ` Jeremy Fitzhardinge
2010-09-20 21:41 ` Konrad Rzeszutek Wilk
2010-09-20 21:55 ` Jeremy Fitzhardinge
2010-09-20 23:42 ` Dan Magenheimer
2010-09-21 0:45 ` Jeremy Fitzhardinge
2010-09-21 8:04 ` Tim Deegan
2010-09-21 11:28 ` Joanna Rutkowska [this message]
2010-09-21 14:34 ` Konrad Rzeszutek Wilk
2010-09-15 19:25 ` Goswin von Brederlow
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=4C9896DE.4020803@invisiblethingslab.com \
--to=joanna@invisiblethingslab.com \
--cc=JBeulich@novell.com \
--cc=dan.magenheimer@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=rafal@invisiblethingslab.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.