All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Keir Fraser <Keir.Fraser@eu.citrix.com>
Subject: Re: [PATCH][v2] Hybrid extension support in Xen
Date: Wed, 3 Feb 2010 00:31:26 +0800	[thread overview]
Message-ID: <201002030031.26179.sheng@linux.intel.com> (raw)
In-Reply-To: <1265127350.24394.572.camel@zakaz.uk.xensource.com>

On Wednesday 03 February 2010 00:15:50 Ian Campbell wrote:
> On Tue, 2010-02-02 at 14:07 +0000, Sheng Yang wrote:
> > On Tuesday 02 February 2010 21:52:44 Ian Campbell wrote:
> > > On Tue, 2010-02-02 at 13:06 +0000, Sheng Yang wrote:
> > > > On Tuesday 02 February 2010 19:26:55 Ian Campbell wrote:
> > > > > On Tue, 2010-02-02 at 08:16 +0000, Sheng Yang wrote:
> > > > > In fact, why is hybrid mode considered a separate mode by the
> > > > > hypervisor at all? Shouldn't it just be an extension to regular HVM
> > > > > mode which guests may choose to use? This seems like it would
> > > > > eliminate a bunch of the random conditionals.
> > > >
> > > > There is still something different from normal HVM guest. For
> > > > example, to use PV timer, we should clean the tsc offset in HVM
> > > > domain; and for event delivery, we would use predefined VIRQ rather
> > > > than emulated IOAPIC/APIC. These code are exclusive, we need them
> > > > wrapped with flag(which we called "hybrid"). The word "mode" here may
> > > > be is inaccuracy, a "extension" should be more proper. I would change
> > > > the phrase next time.
> > >
> > > But the old mechanisms (emulated IOAPIC etc) are still present until
> > > the enable_hybrid HVMOP is called, aren't they? Why can't you perform
> > > the switch at the point at which the new feature is requested by the
> > > guest e.g. when the VIRQ is configured?
> >
> > Yes, they are there before the enable_hybrid HVMOP called. But sorry for
> > I don't quite understand about the point "when the VIRQ is configured?"
> 
> I just meant that you should enable evtchn mode at the point at which
> the guest tries to use event channels and not in some specific "enable
> hybrid mode call", similarly for PV-timer mode etc.
> 
> Of course that presupposes that event channels and APIC etc are mutually
> exclusive, which I don't think is a given.

I would give it try. Seems I need to bind tsc offset clean in event channel 
binding hypercall(if I didn't introduce another hypercall), sounds a little 
messy.
 
> I'm of the opinion that the word "hybrid" should not occur anywhere in
> the tools or hypervisor -- instead there should simply be PV
> functionalities which are made available to HVM guest kernels which
> request them.
> 
> I'm similarly of the opinion that the hybrid-ness should not leak out of
> the core Xen-aware kernel code, for example the word hybrid should not
> be used in the front end drivers, rather the differences should be
> encapsulated in the evtchn code (etc).

That's reasonable. I would try to make them more like natural PV feature.
> 
> > But let IOAPIC/APIC coexisted with event channel is not our target. As
> > we know, the overhead brought by them, notably EOI by LAPIC, impact
> > performance badly. We want event channel that because event channel
> > have much less overhead compared to IOAPIC/LAPIC, a completely
> > virtualization aware solution which elimiate all the unnecessary
> > overhead. That's what we want Xen guest to be benefit.
> 
> It certainly makes sense to deliver interrupts to PV drivers via
> evtchns. I don't think it necessarily follows that all interrupts should
> be injected via event channels. For example for low throughput emulated
> devices I think it makes sense to continue to inject interrupts via the
> emulated *APIC paths such that the treatment of a given device is either
> consistently emulated or consistently paravirtualised but not some
> mixture.

Well, for us, we want evtchn because we want to improve interrupt intensive 
passthru device's performance(though too big for the first step, we have 
experiment patches, but would like to consolidate with the solution of pv_ops 
dom0). The situation won't change if we still use emulated APIC path...

-- 
regards
Yang, Sheng

  reply	other threads:[~2010-02-02 16:31 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02  8:16 [PATCH][v2] Hybrid extension support in Xen Sheng Yang
2010-02-02 11:22 ` Ian Campbell
2010-02-02 12:54   ` Sheng Yang
2010-02-02 13:19     ` Ian Campbell
2010-02-02 13:28       ` Sheng Yang
2010-02-02 13:50         ` Ian Campbell
2010-02-02 14:00           ` Tim Deegan
2010-02-02 14:22             ` Sheng Yang
2010-02-02 14:28           ` Sheng Yang
2010-02-02 13:35   ` Keir Fraser
2010-02-02 13:52     ` Sheng Yang
2010-02-02 14:01       ` Keir Fraser
2010-02-02 14:13         ` Sheng Yang
2010-02-02 11:26 ` Ian Campbell
2010-02-02 13:06   ` Sheng Yang
2010-02-02 13:52     ` Ian Campbell
2010-02-02 14:04       ` Stefano Stabellini
2010-02-02 14:07       ` Sheng Yang
2010-02-02 16:15         ` Ian Campbell
2010-02-02 16:31           ` Sheng Yang [this message]
2010-02-02 18:03             ` Ian Campbell
2010-02-02 18:27             ` Stefano Stabellini
2010-02-03  5:15               ` Sheng Yang
2010-02-03 10:39                 ` Tim Deegan
2010-02-02 11:32 ` Paul Durrant
2010-02-02 13:23 ` Keir Fraser
2010-02-02 13:37   ` Sheng Yang
2010-02-02 14:03     ` Keir Fraser
2010-02-02 14:08       ` Sheng Yang
2010-02-02 14:32         ` Keir Fraser
2010-02-02 14:37           ` Keir Fraser
2010-02-02 15:51             ` Sheng Yang
2010-02-02 14:39           ` Sheng Yang
2010-02-02 13:52 ` Ian Campbell
2010-02-02 13:53   ` Sheng Yang

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=201002030031.26179.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Keir.Fraser@eu.citrix.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.