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

Re: [Xen-devel] [PATCH 5 of 8] Tools: Expose to libxc the total number of shared frames and space saved



> On Fri, 2011-12-09 at 23:15 +0000, Andres Lagar-Cavilla wrote:
>> tools/libxc/xc_private.c |  10 ++++++++++
>>  tools/libxc/xenctrl.h    |   4 ++++
>>  2 files changed, 14 insertions(+), 0 deletions(-)
>>
>>
>> Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
>
> If you pass on someone elses work I think it is normal to add your own
> Signed-off-by (per DCO clause (c)).
>
> [...]
>> diff -r a22140d92931 -r 6e8b8fb2c8b2 tools/libxc/xenctrl.h
>> --- a/tools/libxc/xenctrl.h
>> +++ b/tools/libxc/xenctrl.h
>> @@ -1227,6 +1227,10 @@ int xc_mmuext_op(xc_interface *xch, stru
>>  /* System wide memory properties */
>>  long xc_maximum_ram_page(xc_interface *xch);
>>
>> +long xc_sharing_freed_pages(xc_interface *xch);
>> +
>> +long xc_sharing_used_frames(xc_interface *xch);
We'll comment, certainly. For the record:

used_frames indicates the number of frames of memory that are shared,
each, by two or more domains. We use the term "frame" because it's
commonly used in textbooks for MMUs, in the sense that "a frame hosts a
page" or "a page maps to a frame". Thus our use of shared frames,
representing a different page (albeit with identical contents) to
different domains.

freed_pages indicates the number of individual pages freed as a result of
sharing. These are pages, one per domain.

Andres
>
> A quick comment on what each function returns might be worthwhile, maybe
> it's obvious to someone who knows the sharing stuff, but e.g. does
> "used" mean used right now or does it mean have ever been used? I
> suppose "freed" must be historical.
>
> Also why pages vs frames? The underlying domctl is always pages.
>
> Ian.
>
>> +
>>  /* Get current total pages allocated to a domain. */
>>  long xc_get_tot_pages(xc_interface *xch, uint32_t domid);
>>
>
>
>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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