WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: Device model architecture (Was Re: [Xen-devel] Re: Arelinkerscripts

To: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>, "Sharma, Arun" <arun.sharma@xxxxxxxxx>
Subject: RE: Device model architecture (Was Re: [Xen-devel] Re: Arelinkerscripts needed?)
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Fri, 27 May 2005 20:56:34 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 27 May 2005 12:56:03 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVhvkk+1Mb0QrW3TEyI8Wo8pEHHWAA250RwAAbnwVA=
Thread-topic: Device model architecture (Was Re: [Xen-devel] Re: Arelinkerscripts needed?)
>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Ian Pratt
>Sent: Friday, May 27, 2005 6:49 PM
>> I guess the main logic behind your argument is that there is
>> no need to fully virtualize the device models, so no need to
>> run them within a non-root VMCS.
>
>We can't run them in the same non-root VMCS as the guest since we need
>some virtual address space. Since the hardware does a cr3 switch to the
>monitor_table when doing a vmexit, wwe might as well make better use of
>this and treat the device models as just another paravirtualized guest.

The major benefit of running in vmx mode is the clean and easy support
to existing distribution, without compilation and modification.
Regarding the device model proposed in this thread, since major
modification is unavoidable to add frontend-backend interfaces, I'm also
inclined to take it as another paravirtualized guest as Ian said, to get
maximum performance ;-) 

Actually there're few chances for such standalone DM to access privilege
resources like normal OS kernel. The only event it needs to care
frequently is the notification for emulation start and the one for
completion from backend, and then the only handler can be easily
optimized to cooperatively access necessary context passed from HV. Most
privilege setting can be completed in batch when starting the DM, and
then stable in almost whole lifecycle.

>
>> The only comment I have is: for the case where the device
>> models require the services of a backend driver, you might be
>> paying more than what we currently pay (one domain switch)
>> i.e. vmx domain -> mini os -> backend. But it should be
>> faster for everything else.
>
>The vmx_domain to mini-OS switch happens as part of the vmexit. Work
>will get queued just like a normal frontend talking to a backend, so I
>don't think there's a performance issue here -- it will certainly be
>faster than the current situation.

if I understand correctly, current model does only issue one domain
switch, but it needs more kernel/user context switches which depends on
how many system call issues and how many processes running in service
OS. With DM on mini-OS, one extra context switch does happen between
monitor and mini-OS. But then frontend of DM talks to backend in service
OS directly, and the later resides in kernel space. So actually mini-OS
approach should be faster... and current approach is easier for
maintain. ;-)

>
>Devices such as the APIC/IOAPIC/PIT etc can all be emulated without
>calling out of the device model, and should work with just the same
>performance as having them in Xen as we do today.

Agree.

Thanks,
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • RE: Device model architecture (Was Re: [Xen-devel] Re: Arelinkerscripts needed?), Tian, Kevin <=