Re: [PATCH] finish NUMA code reorg, plug cpuset at creat time support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 Oct 2007 16:54:36 -0400 Daniel Veillard wrote:
>   Okay sorry it took so long, I got distrated by something else and 
> I wanted to come back with a more complete patch for the following:
>   - make sure that cpu expressions coming from the user are reparsed
>     and translated to ranges to make sure we don't have a mismatch between
>     the external representations and what is accepted both by libvirt
>     and xend
>   - Saving the pinning in the XML makes things really complex.
>     alls the XML dump routines of xend assume an SExpr input but 
>     the affinity is not available there. Querying xend may be very costly
>     and it way better to ask at the xen_unified level where the hypervisor
>     hypercall will be used if available
>   - as a result I removed the DumpXML entry point from xen_unified because
>     you need to extend parameters in the xend case
>   - also when coming from the proxy you just have the domain id and
>     it's harder to get the cpu list in an efficient way without 
>     messing even more with the code
> 
> I still think CPU affinity in the domain is misplaced, but well, okay
> I agree to do this for real cpus, this complicates the code a bit though.
> 
>   The associated patch compiles, but I have not yet tested it, it's 
> basically how I would expect to finish the NUMA work, but it certainly need
> debug and testing. I will look at this tomorrow, but I welcome feedback :-)

sounds good to me, I tested with your patch, and I have four fixes for it.
This is a test I did :
[on RHEL5.1]
   ---------------------------------------------------------------
   dumpxml  (conf  -> XML) state:inactive ...(1) and (2)
            (SExpr -> XML) state:active
   define   (XML   -> conf)
   create   (XML   -> SExpr)
   start    (conf  -> XML  -> SExpr)

[on fedora8]
   ---------------------------------------------------------------
   dumpxml  (SExpr -> XML) state:inactive (cannot get by Xen) ...(3)
            (SExpr -> XML) state:active   (get by Xen) ...(3)
   define   (XML   -> SExpr)
   create   (XML   -> SExpr)
   start    (nothing translation)

(1) numa6_fix1.patch
I cannot run the dumpxml command with inactive domain on RHEL5.1.
So, I added the check of domain ID and xendConfigVersion.

(2) numa6_fix2.patch
The discontinuous number is invalid for inactive domain on RHEL5.1.
I guess the cause is wrong argument is specified as maxcpu.
   (e.g.)
   - normal case 
   conf   : cpus = "0,1"
   dumpxml: <vcpu cpuset='0,1'>4</vcpu>
   - invalid case
   conf   : cpus = "0,3"
   dumpxml: <vcpu cpuset='0'>4</vcpu>

(3) numa6_fix3.patch
The expression is different between inactive domain and active domain,
when I don't have vcpu setting for the domain (i.e. "any cpu" is pinned).
   inactive domain :  <vcpu cpuset=''>2</vcpu>
   active domain   :  <vcpu>2</vcpu>
So, I conform to the expression of active domain.

(4) numa6_fix4.patch
The expression is different between "xm vcpu-list" and "virsh dumpxml",
when I specified continuous number.
   (e.g.)
   # xm vcpu-list 200
   Name              ID VCPUs   CPU State   Time(s) CPU Affinity
   test             200     0     1   -b-      10.9 0-1
   test             200     1     0   -b-       9.1 0-1
   test             200     2     4   -b-       3.1 3-4
   test             200     3     5   -b-       3.9 5-6
   # ./virsh dumpxml 200| grep cpu
     <vcpu cpuset='0,1,3-6'>4</vcpu>
So, I change the expression from "," to "-"(range) that I can use to
create the domain.
   (e.g.)
   # ./virsh dumpxml 200| grep cpu
     <vcpu cpuset='0-1,3-6'>4</vcpu>


Regards,
Saori.

Attachment: numa6_fix2.patch
Description: Binary data

Attachment: numa6_fix1.patch
Description: Binary data

Attachment: numa6_fix3.patch
Description: Binary data

Attachment: numa6_fix4.patch
Description: Binary data

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]