<html><body>
<p>I agree to some extent, but I might suggest that discovery and exposure of host system physical resources may be better left to other APIs, since such functionality has widespread uses outside of virtualization management.<br>
<br>
Since you bring it up, we - Open Source CIM interfaces for Xen, via libvirt - are actually having to face this exact problem today, namely what is/are good standardized cross-platform cross-distro Linux interfaces for exposing physical hardware info necessary for virtual resource allocation. Right now we have a some Open Source Linux CIM providers exposing h/w info mined out of, say, /proc, but the architecture and distro ifdefs are getting out of hand... You are quite correct in stating this requirement, and there seems to be multiple candidates (SMBIOS, HPI, SNMP, etc) but I don't have a good answer. My concern would be trying to add and solve this problem within the scope of libvirt.<br>
<br>
- Gareth<br>
<br>
Dr. Gareth S. Bestor<br>
IBM Linux Technology Center<br>
M/S DES2-01<br>
15300 SW Koll Parkway, Beaverton, OR 97006<br>
503-578-3186, T/L 775-3186, Fax 503-578-3186 <br>
<br>
<img src="cid:10__=07BBFBA9DFFCD6458f9e8a93df938@us.ibm.com" width="16" height="16" alt="Inactive hide details for "Daniel P. Berrange" <berrange@redhat.com>">"Daniel P. Berrange" <berrange@redhat.com><br>
<br>
<br>

<table V5DOTBL=true width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img src="cid:20__=07BBFBA9DFFCD6458f9e8a93df938@us.ibm.com" border="0" height="1" width="72" alt=""><br>
</td><td style="background-image:url(cid:30__=07BBFBA9DFFCD6458f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " width="1%"><img src="cid:20__=07BBFBA9DFFCD6458f9e8a93df938@us.ibm.com" border="0" height="1" width="225" alt=""><br>

<ul>
<ul>
<ul>
<ul><b><font size="2">"Daniel P. Berrange" <berrange@redhat.com></font></b><br>
<font size="2">Sent by: libvir-list-bounces@redhat.com</font>
<p><font size="2">03/23/06 08:04 AM</font><br>
<font size="2">Please respond to "Daniel P. Berrange"</font></ul>
</ul>
</ul>
</ul>
</td><td width="100%"><img src="cid:20__=07BBFBA9DFFCD6458f9e8a93df938@us.ibm.com" border="0" height="1" width="1" alt=""><br>
<font size="1" face="Arial">  </font><br>
<font size="2"> To:     </font><font size="2">libvir-list@redhat.com</font><br>
<font size="2"> cc:     </font><br>
<font size="2"> Subject:        </font><font size="2">[Libvir] RFC: requesting APIs for host physical resource discovery</font></td></tr>
</table>
<br>
<br>
<tt>The current libvirt APIs allow the host's physical resources to be split up<br>
and allocated to guest domains, however, there is no way to discover what<br>
the available host resources actually are. Thus I would like to suggest the<br>
inclusion of new APIs to enable host resource discovery. As a starting point<br>
I'd like to be able to query the following information:<br>
<br>
  * Number of physical CPUs - ability to enumerate the CPUs in the host,<br>
    both those currently present, and theoretical maximum (to take account<br>
    of hotplug). <br>
  * Amount of RAM  - actual physical RAM present, and that available for<br>
    guest usage (eg discounting that reserved by a hypervisor or equiv)<br>
  * CPU relationship - ie ability to distinguish between CPUs which<br>
    are hyperthread siblings, on same core, or on separate sockets<br>
<br>
Alonside these basic queries it would be desirable to add a further resource<br>
resource management API to allow for setting of a guest domain's CPU affinity.<br>
ie ability control what CPUs the VMM is allowed to schedule a domain on.<br>
<br>
Once this first basic set of caapbilties for resource discovery are provided<br>
for, then I believe it will be neccessary to provide some more advanced <br>
queries, in particular:<br>
<br>
  * NUMA topology - ability to enumerate NUMA nodes, the CPUs associated<br>
    with each node & the RAM range mapped to that node<br>
<br>
Regards,<br>
Dan.<br>
-- <br>
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|<br>
|=-           Perl modules: </tt><tt><a href="http://search.cpan.org/~danberr/">http://search.cpan.org/~danberr/</a></tt><tt>              -=|<br>
|=-               Projects: </tt><tt><a href="http://freshmeat.net/~danielpb/">http://freshmeat.net/~danielpb/</a></tt><tt>               -=|<br>
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| <br>
<br>
--<br>
Libvir-list mailing list<br>
Libvir-list@redhat.com<br>
</tt><tt><a href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a></tt><tt><br>
</tt>

</body></html>