From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Valzcig Subject: Re: domU to dom0 switch question Date: Fri, 2 Apr 2010 22:28:59 -0400 Message-ID: References: <4BB6A465.1000506@goop.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1292949937==" Return-path: In-Reply-To: <4BB6A465.1000506@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1292949937== Content-Type: multipart/alternative; boundary=0016e65c7bd2c4469204834bdbe9 --0016e65c7bd2c4469204834bdbe9 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Apr 2, 2010 at 10:13 PM, Jeremy Fitzhardinge wrote: > On 04/02/2010 04:02 PM, George Valzcig wrote: > >> I have two questions on between a switch one dom to another dom in Xen. I >> hope this is the right forum to ask these questions ... >> >> 1) other than I / O, there is no reason to switch from one domU to dom0 >> (memory page remapping etc)? If I have a 1 CPU in my physical machine and I >> run a domU with while loop that does nothing but use CPU, there is no reason >> to switch to dom0? >> 2) In Xen PV is the hyper call entry page in the address space of the domU >> - so call to a mapped hyper call not cause context switch - yes? >> > > I don't follow your questions. > > "Dom0" is the domain started by Xen automatically at boot time, which is > privileged and is typically used for its hardware device drivers and > systemwide administrative functions. "DomU" is a less privileged "guest" > domain, which may be either paravirtualized (PV) or using hardware > virtualization features (HVM). > > Note that "dom0" and "domU" are just roles; a single (pvops Linux) kernel > image can be used unchanged as dom0, PV domU or HVM domU. > > You seem to be using the terms "dom0" and "domU" in some other way, so I > think you need to clarify the question before you get the answer you're > looking for. > > Thanks for reply. Sorry for unclear question. I read from the Xen paper dom0 is used for I/O backend driver - you also explain it - thanks. So if some domU wants to I/O, *and only one physical CPU*, domU gets unscheduled - dom0 scheduled - yes? My question 1 is, apart from I/O backend driver, is dom0 used for anything else? I assume application running on domU no I/O. Any other reason why domU will require the help of dom0. My question 2 is, domU requests some service (like page table update) using hypercall. Will this (executing the hypercall and related code) need dom0? My questions because, I want to understand the increased number of context switches and TLB cost (as reported in the paper "The cost of virtualization" by Ulrich Drepper) in the case of Xen. Thanks. > J > --0016e65c7bd2c4469204834bdbe9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, Apr 2, 2010 at 10:13 PM, Jeremy = Fitzhardinge <jerem= y@goop.org> wrote:
On 04/02/2010 04:02 PM, George Valzcig wr= ote:
I have two questions on between a switch one dom to another dom in Xen. I h= ope this is the right forum to ask these questions ...

1) other than I / O, there is no reason to switch from one domU to dom0 (me= mory page remapping etc)? If I have a 1 CPU in my physical machine and I ru= n a domU with while loop that does nothing but use CPU, there is no reason = to switch to dom0?
2) In Xen PV is the hyper call entry page in the address space of the domU = - so call to a mapped hyper call not cause context switch - yes?

I don't follow your questions.

"Dom0" is the domain started by Xen automatically at boot time, w= hich is privileged and is typically used for its hardware device drivers an= d systemwide administrative functions. =A0"DomU" is a less privil= eged "guest" domain, which may be either paravirtualized (PV) or = using hardware virtualization features (HVM).

Note that "dom0" and "domU" are just roles; a single (p= vops Linux) kernel image can be used unchanged as dom0, PV domU or HVM domU= .

You seem to be using the terms "dom0" and "domU" in som= e other way, so I think you need to clarify the question before you get the= answer you're looking for.


Thanks for reply. Sorry for unclear questi= on.

I read from the Xen paper dom0 is used for I/O backend driver - = you also explain it - thanks. So if some domU wants to I/O, *and only one p= hysical CPU*, domU gets unscheduled - dom0 scheduled - yes?

My question 1 is, apart from I/O backend driver, is dom0 used for anyth= ing else? I assume application running on domU no I/O. Any other reason why= domU will require the help of dom0.

My question 2 is, domU request= s some service (like page table update) using hypercall. Will this (executi= ng the hypercall and related code) need dom0?

My questions because, I want to understand the increased number of cont= ext switches and TLB cost (as reported in the paper "The cost of virtu= alization" by Ulrich Drepper) in the case of Xen.

Thanks.

=A0
=A0 =A0J

--0016e65c7bd2c4469204834bdbe9-- --===============1292949937== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1292949937==--