Re: [Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-24 Thread Richard W.M. Jones
beth kon wrote: I assume the caller could legally specify a maxCells value that is greater than nbCells. It just means they provided a bigger buffer than necessary. I don't think that would be a problem. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Addre

Re: [Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-21 Thread beth kon
Richard W.M. Jones wrote: +if (startCell > nbCells - 1) +return -1; Surely, the condition should be `startCell + maxCells > nbCells'? Actually I will discuss this now since I plan to leave it as is. First I'll make sure terms are clear. startCell is the first cell to gather fre

Re: [Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-21 Thread beth kon
Richard W.M. Jones wrote: beth kon wrote: Comments on the code itself: + * @freeMems: pointer to the array of long long + * @startCell: index of first cell to return freeMems info on (0 to + * maxCells - 1). + * @maxCells: number of entries available in freeMems (-1 for sum of +

Re: [Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-21 Thread Daniel Veillard
On Fri, Sep 21, 2007 at 10:59:01AM -0400, beth kon wrote: > oops... meant to post to list as well > beth kon wrote: > and my reply, I didn't realized it was off-list :-) On Fri, Sep 21, 2007 at 09:44:36AM -0400, beth kon wrote: > Daniel Veillard wrote: > > >On Thu, Sep 20, 2007 at 05:10:49PM

Re: [Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-21 Thread beth kon
oops... meant to post to list as well beth kon wrote: Daniel Veillard wrote: On Thu, Sep 20, 2007 at 05:10:49PM -0400, beth kon wrote: Here is my first pass at a patch for accessing the available memory associated with each NUMA cell through libvirt. Thanks ! Thanks for the quick com

Re: [Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-21 Thread Richard W.M. Jones
beth kon wrote: Here is my first pass at a patch for accessing the available memory associated with each NUMA cell through libvirt. The initial framework patch provided by Daniel Veillard is a prereq of this patch: https://www.redhat.com/archives/libvir-list/2007-September/msg00069.html I ha

Re: [Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-21 Thread Richard W.M. Jones
Daniel Veillard wrote: + * If maxCells == -1, the free memory will be summed across all cells and + * returned in freeMems[0]. Hum, that -1 handling is a bit surprizing, but apparently that's what the Xen hypercall does. It's a bit convoluted as an API to get the full free memory on a Node,

Re: [Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-21 Thread Daniel Veillard
On Thu, Sep 20, 2007 at 05:10:49PM -0400, beth kon wrote: > Here is my first pass at a patch for accessing the available memory > associated with each NUMA cell through libvirt. Thanks ! > The initial framework patch provided by Daniel Veillard is a prereq of > this patch: > https://www.redha

[Libvir] RFC PATCH - Initial NodeGetCellsFreeMemory patch

2007-09-20 Thread beth kon
Here is my first pass at a patch for accessing the available memory associated with each NUMA cell through libvirt. The initial framework patch provided by Daniel Veillard is a prereq of this patch: https://www.redhat.com/archives/libvir-list/2007-September/msg00069.html I have not yet tested