From: Konrad Rzeszutek Wilk Subject: Re: [PATCH RESEND 09/12] libxc: numa-sched: enable getting/specifying per-vcpu node-affinity Date: Tue, 12 Nov 2013 11:55:34 -0500 Message-ID: References: <20131105142844.30446.78671.stgit@Solace> <20131105143542.30446.5398.stgit@Solace> <20131112160144.GB11354@phenom.dumpdata.com> <52825A95.7010004@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52825A95.7010004@eu.citrix.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: George Dunlap Cc: Marcus Granado , Keir Fraser , Ian Campbell , Li Yechen , Andrew Cooper , Dario Faggioli , Ian Jackson , xen-devel@lists.xen.org, Jan Beulich , Justin Weaver , Daniel De Graaf , Matt Wilson , Juergen Gross , Elena Ufimtseva List-Id: xen-devel@lists.xenproject.org George Dunlap wrote: >On 11/12/2013 04:01 PM, Konrad Rzeszutek Wilk wrote: >> On Tue, Nov 05, 2013 at 03:35:42PM +0100, Dario Faggioli wrote: >>> by providing the proper get/set interfaces and wiring them >>> to the new domctl-s from the previous commit. >> >> s/previous commit// >> >>> >>> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> >>> --- >>> tools/libxc/xc_domain.c | 82 >+++++++++++++++++++++++++++++++++++++++++++++++ >>> tools/libxc/xenctrl.h | 19 +++++++++++ >>> 2 files changed, 101 insertions(+) >>> >>> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c >>> index f8825a3..e44ad2e 100644 >>> --- a/tools/libxc/xc_domain.c >>> +++ b/tools/libxc/xc_domain.c >>> @@ -272,6 +272,88 @@ out: >>> return ret; >>> } >>> >>> +int xc_vcpu_setnodeaffinity(xc_interface *xch, >>> + uint32_t domid, >>> + int vcpu, >>> + xc_nodemap_t nodemap) >>> +{ >>> + DECLARE_DOMCTL; >>> + DECLARE_HYPERCALL_BUFFER(uint8_t, local); >>> + int ret = -1; >> >> Ewww.. Could we just use regular -Exx for new xc_* calls? > >I think the standard (which Dario is just following here) is to return >-1 and set errno. Since the failures are all after making calls to >other xc functions, they should be setting errno properly, and we >should >be able to just leave it. > > -George I recall some discussion with Ian Campbell where he expressed frustration with the return -1. I thought we wanted to stamp these out going forward?