This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


RE: [Xen-ia64-devel] One unstablity in fast syscall path

To: "Tristan Gingold" <Tristan.Gingold@xxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-ia64-devel" <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] One unstablity in fast syscall path
From: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
Date: Tue, 13 Jun 2006 13:11:04 -0700
Delivery-date: Tue, 13 Jun 2006 13:11:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200606130954.57133.Tristan.Gingold@xxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcaOvhM4Rn1QMKsfRci1GpwviTNRzAAZJpcg
Thread-topic: [Xen-ia64-devel] One unstablity in fast syscall path
> After reading some Xen/ia64 source, I think we'd better not 
> to use vpsr.ic for 
> fast hypercall: it has some interractions with vpsr.ic flag!
> I'd vote for creating a new paravirtualized register: xen_break (or 
> xen_hyperprivop): when this new register is set, breaks are 
> hyperprivop, when 
> not set breaks are reflected.

The advantage of using vpsr.ic is that the vast majority of
hyperprivops (dynamically) are in the ivt where vpsr.ic is
already off.  Using a different virtual register requires
the new virtual register to be set and cleared around the
use of each hyperprivop (or each group of hyperprivops).
> Of course, changing the logic requires some work and careful checks.

Yes, be very careful in changing this code... I spent weeks
debugging these few hundred lines of assembly.  And since
it would change the API between Xen and Xenlinux, it will
be difficult to phase the change in.

>There are the following choices for right fix, I think.
>A. use hypercall instead of hyperprivop.

For vDSO only?  How frequently is this used?  The difference
might be negligible.

The hyperprivop interface has a specific usage -- make high
frequency operations run very fast -- and many constraints
(such as don't use in code that isn't pinned by a vTR, don't
use in code where interrupts can't be turned off).  These
constraints should admittedly be documented.

>B. introduce new flag for hyperprivop instread VPSR.ic as Tristan

See above.  English expression: Don't throw out the baby with
the bath water.  Meaning, just because hyperprivops can't be
used in every situation doesn't mean they should be rewritten
so that they can.  I'll bet this suggestion will have a measurable
negative impact on performance; changing vDSO to use a hypercall
rather than a hyperprivop may not have any negative impact.

>C. use one of itr to map vDSO.

Seems like a waste of a precious resource.

>D. abondan vDSO paravirtualization.

There are two purposes of paravirtualization: one is correctness
and the other is performance.  If "fully virtualized" vDSO
works properly and there's no impact on performance, it
shouldn't be paravirtualized.  If there is a measurable
impact, it should be paravirtualized.

If I understand the problem (not sure I do fully), there is:

E. use hyperprivops for vDSO but via a function call
to code in hypercall.S (which *is* pinned).

Xen-ia64-devel mailing list