From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3 7/8] tools/libxl: introduce libxl_count_physical_sockets Date: Tue, 31 Mar 2015 17:11:48 +0100 Message-ID: <1427818308.2115.179.camel@citrix.com> References: <1427373505-9303-1-git-send-email-chao.p.peng@linux.intel.com> <1427373505-9303-8-git-send-email-chao.p.peng@linux.intel.com> <20150330145101.GK25911@zion.uk.xensource.com> <20150331085122.GB5816@pengc-linux.bj.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150331085122.GB5816@pengc-linux.bj.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chao Peng Cc: keir@xen.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, will.auld@intel.com, JBeulich@suse.com, Wei Liu , dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org On Tue, 2015-03-31 at 16:51 +0800, Chao Peng wrote: > > I think Ian suggested you make this an internal function not a public > > API. But if I misunderstand Ian's intention, please make this function > > return libxl error code. The socket number can be returned from an out > > parameter. I.e. > > > > int libxl_count_physical_sockets(libxl_ctx *ctx, uint32_t *nr_sockets); > > > Making it public is the need of supporting LIBXL_PSR_TARGET_ALL in > libxl_psr_cat_set_cbm(), which is suggested by Ian as well. In such > case, both xl/libxl need to get socket_count. Introduce it in libxl so > that both can make use of it. My expectation was that adding LIBXL_PSR_TARGET_ALL would remove the need for xl to get the socket count, I expected that passing LIBXL_PSR_TARGET_ALL would cause libxl to do all of that internally. I've not looked at the next patch to see why that isn't the case though. Ian. > > Except this, I would like to adopt your suggestions(#ifdef to x86 only > and return error code). > > Chao