From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [vNUMA v2][PATCH 2/8] public interface Date: Tue, 3 Aug 2010 15:37:42 +0200 Message-ID: <4C581BA6.3030502@amd.com> References: <1BEA8649F0C00540AB2811D7922ECB6C9338B4CC@orsmsx507.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dulloor Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Dulloor wrote: > Interface definition. Structure that will be shared with hvmloader (with HVMs) > and directly with the VMs (with PV). > > -dulloor > > Signed-off-by : Dulloor > > +/* vnodes are 1GB-aligned */ > +#define XEN_MIN_VNODE_SHIFT (30) Why that? Do you mean guest memory here? Isn't that a bit restrictive? What if the remaining system resources do not allow this? What about a 5GB guest on 2 nodes? In AMD hardware there is minimum shift of 16MB, so I think 24 bit would be better. +struct xen_vnode_info { + uint8_t mnode_id; /* physical node vnode is allocated from */ + uint32_t start; /* start of the vnode range (in pages) */ + uint32_t end; /* end of the vnode range (in pages) */ +}; + > +struct xen_domain_numa_info { > + uint8_t version; /* Interface version */ > + uint8_t type; /* VM memory allocation scheme (see above) */ > + > + uint8_t nr_vcpus; Isn't that redundant with info stored somewhere else (for instance in the hvm_info table)? > + uint8_t nr_vnodes; > + /* data[] has the following entries : > + * //Only (nr_vnodes) entries are filled, each sizeof(struct xen_vnode_info) > + * struct xen_vnode_info vnode_info[nr_vnodes]; Why would the guest need that info (physical node, start and end) here? Wouldn't be just the size of the node's memory sufficient? Regards, Andre. > + * //Only (nr_vcpus) entries are filled, each sizeof(uint8_t) > + * uint8_t vcpu_to_vnode[nr_vcpus]; > + * //Only (nr_vnodes*nr_vnodes) entries are filled, each sizeof(uint8_t) > + * uint8_t vnode_distance[nr_vnodes*nr_vnodes]; > + */ > + uint8_t data[0]; > +}; > + > +#endif -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 448-3567-12