Skip to contentSkip to conversation

How to detect HAP from DomU?

DISCUSSION Juergen Gross 3 participants 6 messages Nov 10, 2010

lore
Share & tools
lore
#0 lore raw

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

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#1 lore raw
Quoted 8 lines · Juergen Gross

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

#2 lore raw
Quoted 11 lines · Keir Fraser
Quoted 8 lines · Juergen Gross

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.

Quoted 4 lines

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

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#3 lore raw
Quoted 22 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Juergen Gross
Sent: Wednesday, November 10, 2010 4:43 PM
To: Keir Fraser
Cc: [email protected]
Subject: Re: [Xen-devel] How to detect HAP from DomU?

Quoted 11 lines · Keir Fraser
Quoted 8 lines · Juergen Gross

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.

Quoted 7 lines
Quoted 4 lines

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

Quoted 16 lines

Thanks, Juergen

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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw
Quoted 27 lines · Yunhong
Quoted 27 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Juergen Gross
Sent: Wednesday, November 10, 2010 4:43 PM
To: Keir Fraser
Cc: [email protected]
Subject: Re: [Xen-devel] How to detect HAP from DomU?

Quoted 15 lines · Keir Fraser
Quoted 8 lines · Juergen Gross

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.

Quoted 5 lines
Quoted 2 lines

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

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#5 lore raw
In reply to Jiang, Yunhong
Quoted 11 lines · Yunhong
Quoted 7 lines
Quoted 4 lines

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