xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-4.6] xl/vNUMA: Allow empty memory nodes
@ 2015-08-14 16:18 Boris Ostrovsky
  2015-08-14 16:26 ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Boris Ostrovsky @ 2015-08-14 16:18 UTC (permalink / raw)
  To: wei.liu2, Ian.Jackson, ian.campbell
  Cc: xen-devel, dario.faggioli, boris.ostrovsky

The test for 'nr_vmemranges < nr_vnodes' in xc_domain_setvnuma() was
originally writtten with the idea that number of memory ranges would
at least be equal to number of nodes.

We may want to specify nodes with no memory, however, and thus this
check should be removed.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 tools/libxc/xc_domain.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index 2ee26fb..780797f 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -2451,8 +2451,7 @@ int xc_domain_setvnuma(xc_interface *xch,
                              XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
     errno = EINVAL;
 
-    if ( nr_vnodes == 0 || nr_vmemranges == 0 ||
-         nr_vmemranges < nr_vnodes || nr_vcpus == 0 )
+    if ( nr_vnodes == 0 || nr_vmemranges == 0 || nr_vcpus == 0 )
         return -1;
 
     if ( !vdistance || !vcpu_to_vnode || !vmemrange || !vnode_to_pnode )
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.6] xl/vNUMA: Allow empty memory nodes
  2015-08-14 16:18 [PATCH for-4.6] xl/vNUMA: Allow empty memory nodes Boris Ostrovsky
@ 2015-08-14 16:26 ` Wei Liu
  2015-08-14 17:30   ` Boris Ostrovsky
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-08-14 16:26 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: Ian.Jackson, dario.faggioli, wei.liu2, ian.campbell, xen-devel

This title should say "libxc: ..."

On Fri, Aug 14, 2015 at 12:18:52PM -0400, Boris Ostrovsky wrote:
> The test for 'nr_vmemranges < nr_vnodes' in xc_domain_setvnuma() was
> originally writtten with the idea that number of memory ranges would
> at least be equal to number of nodes.
> 
> We may want to specify nodes with no memory, however, and thus this
> check should be removed.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

With my RM hat on, because libxl, hypervisor and hvmloader can already
cope with 0 vmemrange configuration, removing this restriction is safe.

Release-acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  tools/libxc/xc_domain.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
> index 2ee26fb..780797f 100644
> --- a/tools/libxc/xc_domain.c
> +++ b/tools/libxc/xc_domain.c
> @@ -2451,8 +2451,7 @@ int xc_domain_setvnuma(xc_interface *xch,
>                               XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
>      errno = EINVAL;
>  
> -    if ( nr_vnodes == 0 || nr_vmemranges == 0 ||
> -         nr_vmemranges < nr_vnodes || nr_vcpus == 0 )
> +    if ( nr_vnodes == 0 || nr_vmemranges == 0 || nr_vcpus == 0 )
>          return -1;
>  
>      if ( !vdistance || !vcpu_to_vnode || !vmemrange || !vnode_to_pnode )
> -- 
> 1.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.6] xl/vNUMA: Allow empty memory nodes
  2015-08-14 16:26 ` Wei Liu
@ 2015-08-14 17:30   ` Boris Ostrovsky
  2015-08-15  8:32     ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Boris Ostrovsky @ 2015-08-14 17:30 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, dario.faggioli, Ian.Jackson, ian.campbell

On 08/14/2015 12:26 PM, Wei Liu wrote:
> This title should say "libxc: ..."

Ah, of course. Let me know if you want me to re-send it.

-boris

>
> On Fri, Aug 14, 2015 at 12:18:52PM -0400, Boris Ostrovsky wrote:
>> The test for 'nr_vmemranges < nr_vnodes' in xc_domain_setvnuma() was
>> originally writtten with the idea that number of memory ranges would
>> at least be equal to number of nodes.
>>
>> We may want to specify nodes with no memory, however, and thus this
>> check should be removed.
>>
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
>
> With my RM hat on, because libxl, hypervisor and hvmloader can already
> cope with 0 vmemrange configuration, removing this restriction is safe.
>
> Release-acked-by: Wei Liu <wei.liu2@citrix.com>
>
>> ---
>>   tools/libxc/xc_domain.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
>> index 2ee26fb..780797f 100644
>> --- a/tools/libxc/xc_domain.c
>> +++ b/tools/libxc/xc_domain.c
>> @@ -2451,8 +2451,7 @@ int xc_domain_setvnuma(xc_interface *xch,
>>                                XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
>>       errno = EINVAL;
>>   
>> -    if ( nr_vnodes == 0 || nr_vmemranges == 0 ||
>> -         nr_vmemranges < nr_vnodes || nr_vcpus == 0 )
>> +    if ( nr_vnodes == 0 || nr_vmemranges == 0 || nr_vcpus == 0 )
>>           return -1;
>>   
>>       if ( !vdistance || !vcpu_to_vnode || !vmemrange || !vnode_to_pnode )
>> -- 
>> 1.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.6] xl/vNUMA: Allow empty memory nodes
  2015-08-14 17:30   ` Boris Ostrovsky
@ 2015-08-15  8:32     ` Wei Liu
  2015-08-16  8:02       ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-08-15  8:32 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: Ian.Jackson, dario.faggioli, Wei Liu, ian.campbell, xen-devel

On Fri, Aug 14, 2015 at 01:30:33PM -0400, Boris Ostrovsky wrote:
> On 08/14/2015 12:26 PM, Wei Liu wrote:
> >This title should say "libxc: ..."
> 
> Ah, of course. Let me know if you want me to re-send it.
> 

No need. I will ask Ian to handle this while committing.

Wei.

> -boris
> 
> >
> >On Fri, Aug 14, 2015 at 12:18:52PM -0400, Boris Ostrovsky wrote:
> >>The test for 'nr_vmemranges < nr_vnodes' in xc_domain_setvnuma() was
> >>originally writtten with the idea that number of memory ranges would
> >>at least be equal to number of nodes.
> >>
> >>We may want to specify nodes with no memory, however, and thus this
> >>check should be removed.
> >>
> >>Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> >Acked-by: Wei Liu <wei.liu2@citrix.com>
> >
> >With my RM hat on, because libxl, hypervisor and hvmloader can already
> >cope with 0 vmemrange configuration, removing this restriction is safe.
> >
> >Release-acked-by: Wei Liu <wei.liu2@citrix.com>
> >
> >>---
> >>  tools/libxc/xc_domain.c | 3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >>
> >>diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
> >>index 2ee26fb..780797f 100644
> >>--- a/tools/libxc/xc_domain.c
> >>+++ b/tools/libxc/xc_domain.c
> >>@@ -2451,8 +2451,7 @@ int xc_domain_setvnuma(xc_interface *xch,
> >>                               XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
> >>      errno = EINVAL;
> >>-    if ( nr_vnodes == 0 || nr_vmemranges == 0 ||
> >>-         nr_vmemranges < nr_vnodes || nr_vcpus == 0 )
> >>+    if ( nr_vnodes == 0 || nr_vmemranges == 0 || nr_vcpus == 0 )
> >>          return -1;
> >>      if ( !vdistance || !vcpu_to_vnode || !vmemrange || !vnode_to_pnode )
> >>-- 
> >>1.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.6] xl/vNUMA: Allow empty memory nodes
  2015-08-15  8:32     ` Wei Liu
@ 2015-08-16  8:02       ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-08-16  8:02 UTC (permalink / raw)
  To: Wei Liu, Boris Ostrovsky; +Cc: xen-devel, dario.faggioli, Ian.Jackson

On Sat, 2015-08-15 at 09:32 +0100, Wei Liu wrote:
> On Fri, Aug 14, 2015 at 01:30:33PM -0400, Boris Ostrovsky wrote:
> > On 08/14/2015 12:26 PM, Wei Liu wrote:
> > > This title should say "libxc: ..."
> > 
> > Ah, of course. Let me know if you want me to re-send it.
> > 
> 
> No need. I will ask Ian to handle this while committing.

Done.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-16  8:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 16:18 [PATCH for-4.6] xl/vNUMA: Allow empty memory nodes Boris Ostrovsky
2015-08-14 16:26 ` Wei Liu
2015-08-14 17:30   ` Boris Ostrovsky
2015-08-15  8:32     ` Wei Liu
2015-08-16  8:02       ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).