From: David Vrabel <david.vrabel@citrix.com>
To: Andres Lagar-Cavilla <andreslc@gridcentric.ca>
Cc: Olaf Hering <olaf@aepfle.de>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"Keir (Xen.org)" <keir@xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [RFC PATCH 0/3] xen/privcmd: support for paged-out frames
Date: Fri, 24 Aug 2012 12:58:15 +0100 [thread overview]
Message-ID: <50376C57.2050008@citrix.com> (raw)
In-Reply-To: <E11EC85A-BEB5-4DAF-B899-8DEE1E52D382@gridcentric.ca>
On 24/08/12 02:32, Andres Lagar-Cavilla wrote:
> On Aug 23, 2012, at 1:13 PM, David Vrabel wrote:
>
>> This series is a straight forward-port of some functionality from
>> classic kernels to support Xen hosts that do paging of guests.
>>
>> This isn't functionality the XenServer makes use of so I've not tested
>> these with paging in use (GridCentric requested that our older kernels
>> supported this and I'm just doing the forward port).
>
> Thanks for this series. Very timely. I may add that we are not the
> only consumers of paging. This functionality was first added into
> classic kernels by Olaf Hering from Suse (added to cc).
Sure.
>> I'm not entirely happy about the approach used here because:
>>
>> 1. It relies on the meaning of the return code of the update_mmu
>> hypercall and it assumes the value Xen used for -ENOENT is the same
>> the kernel uses. This does not appear to be a formal part of the
>> hypercall ABI.
>>
>> Keir, can you comment on this?
>
> I see your point. I may add that it's likely to be more pervasive
> than just relying on ENOENT being 12. Which is a fairly safe bet.
>
>>
>> 2. It seems more sensible to have the kernel do the retries instead of
>> libxc doing them. The kernel has to have a mechanism for this any way
>> (for mapping back/front rings).
>>
>> 3. The current way of handling paged-out frames by repeatedly retrying
>> is a bit lame. Shouldn't there be some event that the guest waiting
>> for the frame can wait on instead? By moving the retry mechanism into
>> the kernel we can change this without impacting the ABI to userspace.
>
> Lame is an interesting choice of language :)
My embedded background makes me frown at anything that polls -- it's
generally bad for power consumption.
> I am not a huge fan of libxc retry, but we've been pounding it quite
> hard for a while and it works -- and, importantly, it yields the
> scheduler :)
>
> While kernel retry may benefit from hypothetical code reuse,
> "Shouldn't there be some event that the guest waiting for the frame can
> wait on instead?" will need to become concrete to start a real discussion.
In kernel retries don't require the event. Using the event is something
to consider in the longer term.
> For better or worse, since xen-4.1 (!) libxc will do the right thing
> if fed the appropriate errno.
At a minimum I think we need to fix the existing interface to have the
behavior libxc expects.
Is PRIVCMD_MMAPBATCH_V2 actually required? It doesn't seem to do much
more than the V1 interface. Perhaps the fix in patches #1 and #2
sufficient to make libxc work?
David
next prev parent reply other threads:[~2012-08-24 11:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 17:13 [RFC PATCH 0/3] xen/privcmd: support for paged-out frames David Vrabel
2012-08-23 17:13 ` [PATCH 1/3] xen/mm: return more precise error from xen_remap_domain_range() David Vrabel
2012-08-23 17:13 ` [PATCH 2/3] xen/privcmd: report paged-out frames in PRIVCMD_MMAPBATCH ioctl David Vrabel
2012-08-24 1:34 ` Andres Lagar-Cavilla
2012-08-24 18:01 ` Bastian Blank
2012-08-23 17:13 ` [PATCH 3/3] xen/privcmd: add PRIVCMD_MMAPBATCH_V2 ioctl David Vrabel
2012-08-23 19:40 ` Konrad Rzeszutek Wilk
2012-08-24 11:14 ` David Vrabel
2012-08-24 11:41 ` Konrad Rzeszutek Wilk
2012-08-24 11:50 ` Ian Campbell
2012-08-24 12:00 ` David Vrabel
2012-08-24 12:14 ` Ian Campbell
2012-08-24 1:35 ` Andres Lagar-Cavilla
2012-08-24 1:32 ` [RFC PATCH 0/3] xen/privcmd: support for paged-out frames Andres Lagar-Cavilla
2012-08-24 11:58 ` David Vrabel [this message]
2012-08-24 12:14 ` Ian Campbell
2012-08-24 15:06 ` Andres Lagar-Cavilla
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=50376C57.2050008@citrix.com \
--to=david.vrabel@citrix.com \
--cc=andreslc@gridcentric.ca \
--cc=keir@xen.org \
--cc=konrad.wilk@oracle.com \
--cc=olaf@aepfle.de \
--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.