All of lore.kernel.org
 help / color / mirror / Atom feed
* How to detect HAP from DomU?
@ 2010-11-10  8:22 Juergen Gross
  2010-11-10  8:36 ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2010-11-10  8:22 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

Hi,

is there any way for a HVM-domain to detect whether it is running with HAP
enabled? I couldn't find any interface for this information.

Background: in our BS2000 domain (HVM with PV-drivers) we sometimes have to
copy complete pages between kernel and user. An alternative to the copy
would be a remapping of the page. The remap is faster than the copy with HAP
enabled, but much slower without HAP. So it would be best to copy without HAP
and remap with HAP.

I think this would be a candidate for XEN features (another bit in
xen/include/public/features.h). If there are no objections to this idea, I'll
make a patch.


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to detect HAP from DomU?
  2010-11-10  8:22 How to detect HAP from DomU? Juergen Gross
@ 2010-11-10  8:36 ` Keir Fraser
  2010-11-10  8:42   ` Juergen Gross
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2010-11-10  8:36 UTC (permalink / raw)
  To: Juergen Gross, xen-devel@lists.xensource.com

On 10/11/2010 08:22, "Juergen Gross" <juergen.gross@ts.fujitsu.com> wrote:

> is there any way for a HVM-domain to detect whether it is running with HAP
> enabled? I couldn't find any interface for this information.
> 
> Background: in our BS2000 domain (HVM with PV-drivers) we sometimes have to
> copy complete pages between kernel and user. An alternative to the copy
> would be a remapping of the page. The remap is faster than the copy with HAP
> enabled, but much slower without HAP. So it would be best to copy without HAP
> and remap with HAP.

You could do a few remaps and copies and see how long it takes? Has the
advantage that you aren't tied up to one policy based on one system's
timings for those particuler ops. I don't think basing policy on static
assumptions about hidden implementation features is a good idea.

 -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to detect HAP from DomU?
  2010-11-10  8:36 ` Keir Fraser
@ 2010-11-10  8:42   ` Juergen Gross
  2010-11-10  8:44     ` Jiang, Yunhong
  0 siblings, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2010-11-10  8:42 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel@lists.xensource.com

On 11/10/10 09:36, Keir Fraser wrote:
> On 10/11/2010 08:22, "Juergen Gross"<juergen.gross@ts.fujitsu.com>  wrote:
>
>> is there any way for a HVM-domain to detect whether it is running with HAP
>> enabled? I couldn't find any interface for this information.
>>
>> Background: in our BS2000 domain (HVM with PV-drivers) we sometimes have to
>> copy complete pages between kernel and user. An alternative to the copy
>> would be a remapping of the page. The remap is faster than the copy with HAP
>> enabled, but much slower without HAP. So it would be best to copy without HAP
>> and remap with HAP.
>
> You could do a few remaps and copies and see how long it takes? Has the
> advantage that you aren't tied up to one policy based on one system's
> timings for those particuler ops. I don't think basing policy on static
> assumptions about hidden implementation features is a good idea.

Okay, that's a good idea.
I'm going this way.


Thanks, Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: How to detect HAP from DomU?
  2010-11-10  8:42   ` Juergen Gross
@ 2010-11-10  8:44     ` Jiang, Yunhong
  2010-11-10  8:49       ` Juergen Gross
  2010-11-10  8:50       ` Keir Fraser
  0 siblings, 2 replies; 6+ messages in thread
From: Jiang, Yunhong @ 2010-11-10  8:44 UTC (permalink / raw)
  To: Juergen Gross, Keir Fraser; +Cc: xen-devel@lists.xensource.com



>-----Original Message-----
>From: xen-devel-bounces@lists.xensource.com
>[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Juergen Gross
>Sent: Wednesday, November 10, 2010 4:43 PM
>To: Keir Fraser
>Cc: xen-devel@lists.xensource.com
>Subject: Re: [Xen-devel] How to detect HAP from DomU?
>
>On 11/10/10 09:36, Keir Fraser wrote:
>> On 10/11/2010 08:22, "Juergen Gross"<juergen.gross@ts.fujitsu.com>  wrote:
>>
>>> is there any way for a HVM-domain to detect whether it is running with HAP
>>> enabled? I couldn't find any interface for this information.
>>>
>>> Background: in our BS2000 domain (HVM with PV-drivers) we sometimes have to
>>> copy complete pages between kernel and user. An alternative to the copy
>>> would be a remapping of the page. The remap is faster than the copy with HAP
>>> enabled, but much slower without HAP. So it would be best to copy without HAP
>>> and remap with HAP.
>>
>> You could do a few remaps and copies and see how long it takes? Has the
>> advantage that you aren't tied up to one policy based on one system's
>> timings for those particuler ops. I don't think basing policy on static
>> assumptions about hidden implementation features is a good idea.
>
>Okay, that's a good idea.
>I'm going this way.

Will this works for Live Migration? After LM, your previous check will be invalid. (Can we migrate between system w/wo HAP?)
Or you can check after each LM.

--jyh

>
>
>Thanks, Juergen
>
>--
>Juergen Gross                 Principal Developer Operating Systems
>TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
>Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
>Domagkstr. 28                           Internet: ts.fujitsu.com
>D-80807 Muenchen                 Company details:
>ts.fujitsu.com/imprint.html
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to detect HAP from DomU?
  2010-11-10  8:44     ` Jiang, Yunhong
@ 2010-11-10  8:49       ` Juergen Gross
  2010-11-10  8:50       ` Keir Fraser
  1 sibling, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2010-11-10  8:49 UTC (permalink / raw)
  To: Jiang, Yunhong; +Cc: xen-devel@lists.xensource.com, Keir Fraser

On 11/10/10 09:44, Jiang, Yunhong wrote:
>
>
>> -----Original Message-----
>> From: xen-devel-bounces@lists.xensource.com
>> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Juergen Gross
>> Sent: Wednesday, November 10, 2010 4:43 PM
>> To: Keir Fraser
>> Cc: xen-devel@lists.xensource.com
>> Subject: Re: [Xen-devel] How to detect HAP from DomU?
>>
>> On 11/10/10 09:36, Keir Fraser wrote:
>>> On 10/11/2010 08:22, "Juergen Gross"<juergen.gross@ts.fujitsu.com>   wrote:
>>>
>>>> is there any way for a HVM-domain to detect whether it is running with HAP
>>>> enabled? I couldn't find any interface for this information.
>>>>
>>>> Background: in our BS2000 domain (HVM with PV-drivers) we sometimes have to
>>>> copy complete pages between kernel and user. An alternative to the copy
>>>> would be a remapping of the page. The remap is faster than the copy with HAP
>>>> enabled, but much slower without HAP. So it would be best to copy without HAP
>>>> and remap with HAP.
>>>
>>> You could do a few remaps and copies and see how long it takes? Has the
>>> advantage that you aren't tied up to one policy based on one system's
>>> timings for those particuler ops. I don't think basing policy on static
>>> assumptions about hidden implementation features is a good idea.
>>
>> Okay, that's a good idea.
>> I'm going this way.
>
> Will this works for Live Migration? After LM, your previous check will be invalid. (Can we migrate between system w/wo HAP?)
> Or you can check after each LM.

The same problem applies to a decision based on information supplied by the
hypervisor.
I'll have to reconsider the decision in any case, dynamical testing just takes
some microseconds more, but is more flexible.


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to detect HAP from DomU?
  2010-11-10  8:44     ` Jiang, Yunhong
  2010-11-10  8:49       ` Juergen Gross
@ 2010-11-10  8:50       ` Keir Fraser
  1 sibling, 0 replies; 6+ messages in thread
From: Keir Fraser @ 2010-11-10  8:50 UTC (permalink / raw)
  To: Jiang, Yunhong, Juergen Gross; +Cc: xen-devel@lists.xensource.com

On 10/11/2010 08:44, "Jiang, Yunhong" <yunhong.jiang@intel.com> wrote:

>>> You could do a few remaps and copies and see how long it takes? Has the
>>> advantage that you aren't tied up to one policy based on one system's
>>> timings for those particuler ops. I don't think basing policy on static
>>> assumptions about hidden implementation features is a good idea.
>> 
>> Okay, that's a good idea.
>> I'm going this way.
> 
> Will this works for Live Migration? After LM, your previous check will be
> invalid. (Can we migrate between system w/wo HAP?)
> Or you can check after each LM.

Yeah, you'd have to do that regardless of how you make the copy/remap
decision. Well, unless your migration pool is homogeneous, which it ought to
be in many cases. Anyhow, if the guest has PV drivers then you get a
migration callback and you can hook off that easy enough.

 -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-10  8:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-10  8:22 How to detect HAP from DomU? Juergen Gross
2010-11-10  8:36 ` Keir Fraser
2010-11-10  8:42   ` Juergen Gross
2010-11-10  8:44     ` Jiang, Yunhong
2010-11-10  8:49       ` Juergen Gross
2010-11-10  8:50       ` Keir Fraser

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.