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

Re: [Xen-devel] [PATCH 1/7] xen: vNUMA support for PV guests



Hi Elena,
Congratulations to your work again!

Have you considered the other memory operations in xen/common/memory.c?
There are two important function: decrease_reservation(&args) and  populate_physmap(&args)
decrease_reservation(&args) remove pages from domain. populate_physmap(&args) alloc pages for domain.

Both of them have NUMA operation. (there is also a function name increase_reservation(&args), I don't know why it's here since guest domain wouldn't use it as far as I know...)
Guest domain pass the mask of nodes to xen by these two hypercalls.

For decrease_reservation, xen will also receive a number of pages. We just free them from domain. Here, we should update the memory size of vnodes and pnodes
(I think you keep a counter for the page numbers of each vnode and pnode, something as vnuma_memszs, but please forgive me that you have submitted such a huge patch that I could not understand everything in time : - |    )

For populate_physmap, xen will allocate blank pages from its heap for domain guest, from specific nodes, according to the nodemask. Here we should update your counters too!

And as I see, we don't have a protocol here on whether the nodemask in (&args ) is pnode or vnode.

I think it should be vnode, since guest domain knows nothing about the node affinity.

So my idea could be: we communicate with guest domain using vnode IDs. If we need to change the memory size of guest domain, for example, memory increase/decrease on pnode[0],
we use your node affinity to change pnode[0] to vnodes_mask, pass it to guest domain. And in the two functions of memory.c mentioned above, we received the vnode_mask, transfer it back to pnode_mask, thus it will work perfectly! And we don't need an extra hypercall for guest domain any more!

Elena and Dario, what is your options?





--
Yechen Li

Team of System Virtualization and Cloud Computing 
School of Electronic Engineering  and Computer Science
Peking University, China

Nothing is impossible because impossible itself  says: " I'm possible "
lccycc From PKU
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.