From: Wei Liu Subject: Re: [PATCH 02/19] xen: make two memory hypercalls vNUMA-aware Date: Fri, 21 Nov 2014 17:30:24 +0000 Message-ID: <20141121173024.GA17978@zion.uk.xensource.com> References: <1416582421-10789-1-git-send-email-wei.liu2@citrix.com> <1416582421-10789-3-git-send-email-wei.liu2@citrix.com> <546F7E5D0200007800049EA3@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <546F7E5D0200007800049EA3@mail.emea.novell.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: Jan Beulich Cc: Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, Nov 21, 2014 at 05:03:09PM +0000, Jan Beulich wrote: > >>> On 21.11.14 at 16:06, wrote: > > @@ -747,6 +786,17 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg) > > return start_extent; > > args.domain = d; > > > > + args.memflags |= MEMF_node(XENMEMF_get_node(reservation.mem_flags)); > > + if ( reservation.mem_flags & XENMEMF_exact_node_request ) > > + args.memflags |= MEMF_exact_node; > > + > > + rc = translate_vnode_to_pnode(d, &reservation, &args); > > + if ( rc ) > > + { > > + rcu_unlock_domain(d); > > + return rc; > > I'm afraid you got misguided here by the (buggy) adjacent XSM error > path: You shouldn't return a negative error code but "start_extent" > here. And I'll try to remember to fix the XSM path post-4.5. > Fixed. > > +/* Guset can use XENMEMF_vnode to specify virtual node for memory op. */ > > +#define XENFEAT_memory_op_vnode_supported 13 > > You introduce this flag but then don't use it? Also there's a typo in > the comment. > Oops, a hunk is missing. Fixed. Wei. > Jan