|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: [PATCH][RFC] to fix xm list memory reporting
McAfee, Tommie M wrote: Anthony, I'm using watches on the xenstore to set self.info['memory'].You should gracefully handle the case where the info isn't in XenStore.If the domain never writes to the store, Wether it is unable to, or if this balloon driver isn't in use, then functionality will be as it always was, I'm not relying on xen-store. self.info['memory'] only gets overwritten if the balloon driver (or perhaps anyone) writes to the memory/xmtarget path.However, I did not think of some of the other points that you have brought up. Do you think that it is overkill at this point to address this, or should I look further into the issue? If we're using the wrong entry from xc_dominfo_t then we ought to use the right one. Should be a 1-line fix. Regards, Anthony Liguori Tommie McAfeeXen-Testing-----Original Message----- From: Anthony Liguori [mailto:aliguori@xxxxxxxxxx] Sent: Wed 10/11/2006 5:34 PM To: McAfee, Tommie M Cc: xen-devel Subject: Re: [PATCH][RFC] to fix xm list memory reportingThis patch breaks the domU ABI.You can't assume that the driver will have the modified balloon driver because it could be any 3.0.x guest.You should gracefully handle the case where the info isn't in XenStore.However, this patch concerns me in another way. You're relying on the guest to report how much memory it has? What prevents a guest from lying and claiming it has less memory than it really does? Forget about lying, what about buggy guests?Isn't this info available from the hypervisor? Regards, Anthony Liguori McAfee, Tommie M wrote:This patch addresses bugzilla #649, enabling `xm list' to display the actual amount of memory allocated by a guest. This is done by checking the value that the balloon driver returns after memory requests. As a result, I'm noticing that a guest that I've set to start with 128Mb will actually give the user 126Mb. All other allocations perform normally, and attempting to over-allocate will simply return the amount of space that the domain was able to expand to. Under the premises that xm list should report actual memory values, 2 tests in xm-test may need to be modified to verify the amount of memory that a guest is physically using, and not rely on the value in the config file as being the amount of memory that the guest will have.xm-test reactions to patch as of changset 11376: REASON: Started domain with 128MB, but it got 126 MB FAIL: 08_create_mem128_pos.test REASON: Started domain with 256MB, but it got 254 MB FAIL: 09_create_mem256_pos.testRunning 'free' inside of each guest shows 126, and 254 respectively, not their config file #'s.Signed-off-by: Tommie McAfee <tommie.mcafee@xxxxxxxxxx> Regards, Tommie McAfeeXen-Testing------------------------------------------------------------------------ diff -r 593b5623a0d2 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Fri Sep 29 15:40:35 2006 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Wed Oct 04 14:46:33 2006 -0400 @@ -57,6 +57,8 @@ #include <xen/xenbus.h>#define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10))+#define NOXENBUS 0 +#define XENBUSREADY 1#ifdef CONFIG_PROC_FSstatic struct proc_dir_entry *balloon_pde; @@ -83,6 +85,9 @@ extern unsigned long totalram_pages;/* We may hit the hard limit in Xen. If we do then we remember it. */static unsigned long hard_limit; + +/* Aknowledge that xenstore is available */ +static int xenbus_status;/* _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |