From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Daniel Stodden <daniel.stodden@citrix.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: blktap: Sync with XCP, dropping zero-copy.
Date: Wed, 17 Nov 2010 14:14:58 -0800 [thread overview]
Message-ID: <4CE453E2.1000308@goop.org> (raw)
In-Reply-To: <1290031020.11102.1410.camel@agari.van.xensource.com>
On 11/17/2010 01:57 PM, Daniel Stodden wrote:
> On Wed, 2010-11-17 at 16:02 -0500, Jeremy Fitzhardinge wrote:
>> On 11/17/2010 12:21 PM, Daniel Stodden wrote:
>>> And, like all granted frames, not owning them implies they are not
>>> resolvable via mfn_to_pfn, thereby failing in follow_page, thereby gup()
>>> without the VM_FOREIGN hack.
>> Hm, I see. Well, I wonder if using _PAGE_SPECIAL would help (it is put
>> on usermode ptes which don't have a backing struct page). After all,
>> there's no fundamental reason why it would need a pfn; the mfn in the
>> pte is what's actually needed to ultimately generate a DMA descriptor.
> The kernel needs the page structs at least for locking and refcounting.
Yeah.
> There's also a some trickier stuff in there. Like redirtying disk-backed
> user memory after read completion, in case it's been laundered. (So that
> an AIO on unpinned user memory doesn't subsequently get flashed back
> when cycling through swap, if I understood that thing correctly.)
>
> Doesn't apply for blktap (it's all reserved pages). All I mean is: I
> wouldn't exactly see some innocent little dio hack or so shape up in
> there.
>
> Kernel allowing to DMA into a bare pfnmap -- From the platform POV, I'd
> agree. E.g. there's a concept of devices DMA-ing into arbitrary I/O
> memory space, not host memory, on some bus architectures. PCI would come
> to my mind (the old shared medium stuff, unsure about those newfangled
> P-t-P topologies). But not in Linux, so I presently don't see anybody
> upstream bothering to make block-I/O request addressing more forgiving
> than it is.
>
> PAGE_SPECIAL -- to the kernel, that means the opposite: page structs
> which aren't backed by 'real' memory, so gup(), for example, is told to
> fail (how nasty).
It's pfns with no corresponding struct page - it's the pte level
equivalent of VM_PFNMAP at the VMA level. But you're right that we
can't do without struct pages.
So we're back to needing a way of mapping from a random mfn to a pfn so
we can find the corresponding struct page. I would be tempted to put a
layer over m2p to allow local m2p mappings to override the global m2p table.
> In contrast, VM_FOREIGN is non-memory backed by page
> structs.
Yep.
J
next prev parent reply other threads:[~2010-11-17 22:14 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 23:31 blktap: Sync with XCP, dropping zero-copy Daniel Stodden
2010-11-12 23:31 ` [PATCH 1/5] blktap: Manage segment buffers in mempools Daniel Stodden
2010-11-12 23:31 ` [PATCH 2/5] blktap: Make VMAs non-foreign and bounce buffered Daniel Stodden
2010-11-12 23:31 ` [PATCH 3/5] blktap: Add queue access macros Daniel Stodden
2010-11-12 23:31 ` [PATCH 4/5] blktap: Forward port to 2.6.32 Daniel Stodden
2010-11-12 23:31 ` [PATCH 5/5] Fix compilation format warning in drivers/xen/blktap/device.c Daniel Stodden
2010-11-13 0:50 ` blktap: Sync with XCP, dropping zero-copy Jeremy Fitzhardinge
2010-11-13 3:56 ` Daniel Stodden
[not found] ` <1289620544.11102.373.camel@agari.van.xensource.com>
2010-11-15 18:27 ` Jeremy Fitzhardinge
2010-11-15 19:19 ` Ian Campbell
2010-11-15 19:34 ` Jeremy Fitzhardinge
2010-11-15 20:07 ` Ian Campbell
2010-11-16 0:43 ` Daniel Stodden
2010-11-16 9:13 ` Daniel Stodden
2010-11-16 12:17 ` Stefano Stabellini
2010-11-16 16:11 ` Konrad Rzeszutek Wilk
2010-11-16 16:16 ` Stefano Stabellini
2010-11-17 2:40 ` Daniel Stodden
2010-11-17 12:35 ` Stefano Stabellini
2010-11-17 15:34 ` Jonathan Ludlam
2010-11-16 13:00 ` Dave Scott
2010-11-16 14:48 ` Stefano Stabellini
2010-11-16 17:56 ` Jeremy Fitzhardinge
2010-11-16 21:28 ` Daniel Stodden
2010-11-17 17:04 ` Ian Campbell
2010-11-17 19:27 ` Daniel Stodden
2010-11-18 13:56 ` Ian Campbell
2010-11-18 19:37 ` Daniel Stodden
2010-11-19 10:57 ` Ian Campbell
2010-11-17 18:00 ` Jeremy Fitzhardinge
2010-11-17 20:21 ` Daniel Stodden
2010-11-17 21:02 ` Jeremy Fitzhardinge
2010-11-17 21:57 ` Daniel Stodden
2010-11-17 22:14 ` Jeremy Fitzhardinge [this message]
[not found] ` <1290035201.11102.1577.camel@agari.van.xensource.com>
[not found] ` <4CE46A03.3010104@goop.org>
[not found] ` <1290040898.11102.1709.camel@agari.van.xensource.com>
2010-11-18 2:29 ` Jeremy Fitzhardinge
2010-11-17 23:32 ` Daniel Stodden
[not found] <20101116215621.59FC2CF782@homiemail-mx7.g.dreamhost.com>
2010-11-17 16:36 ` Andres Lagar-Cavilla
2010-11-17 17:52 ` Jeremy Fitzhardinge
2010-11-17 19:47 ` Andres Lagar-Cavilla
2010-11-17 23:42 ` Daniel Stodden
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=4CE453E2.1000308@goop.org \
--to=jeremy@goop.org \
--cc=Xen-devel@lists.xensource.com \
--cc=daniel.stodden@citrix.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.