* [PATCH] balloon bugfix on -TESTING
@ 2005-07-18 6:24 aq
2005-07-18 7:52 ` aq
0 siblings, 1 reply; 3+ messages in thread
From: aq @ 2005-07-18 6:24 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
This patch is for -testing, to fix some wrong calculates of max_pages
and max_memkb. Now balloon problem goes away (on *testing*).
Unfortunately i cannot confirm the similar fix to -unstable yesterday
is able to fix balloon problem, since i got some troubles creating
domU with the latest -unstable.
Demonstration:
$ xm list
Name Id Mem(MB) CPU State Time(s) Console
Domain-0 0 92 0 r---- 44.3
tty 1 40 0 -b--- 0.9 9601
$ xm balloon tty 45
bun@dewey2:~/projects/myxen$ xm list
Name Id Mem(MB) CPU State Time(s) Console
Domain-0 0 92 0 r---- 45.3
tty 1 45 0 -b--- 0.9 9601
bun@dewey2:~/projects/myxen$ xm balloon tty 35
bun@dewey2:~/projects/myxen$ xm list
Name Id Mem(MB) CPU State Time(s) Console
Domain-0 0 92 0 r---- 46.1
tty 1 35 0 -b--- 0.9 9601
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
$ diffstat balloon.patch
tools/libxc/xc_domain.c | 2 +-
xen/common/dom0_ops.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[-- Attachment #2: balloon.patch --]
[-- Type: application/octet-stream, Size: 987 bytes --]
diff -r 1cf15df7acf7 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c Sat Jul 16 16:44:39 2005
+++ b/tools/libxc/xc_domain.c Mon Jul 18 15:06:38 2005
@@ -107,7 +107,7 @@
DOMFLAGS_SHUTDOWNMASK;
info->nr_pages = op.u.getdomaininfo.tot_pages;
- info->max_memkb = op.u.getdomaininfo.max_pages<<(PAGE_SHIFT);
+ info->max_memkb = op.u.getdomaininfo.max_pages<<(PAGE_SHIFT-10);
info->shared_info_frame = op.u.getdomaininfo.shared_info_frame;
info->cpu_time = op.u.getdomaininfo.cpu_time;
diff -r 1cf15df7acf7 xen/common/dom0_ops.c
--- a/xen/common/dom0_ops.c Sat Jul 16 16:44:39 2005
+++ b/xen/common/dom0_ops.c Mon Jul 18 15:06:38 2005
@@ -477,7 +477,7 @@
if ( d != NULL )
{
d->max_pages =
- (op->u.setdomainmaxmem.max_memkb+PAGE_SIZE-1)>> PAGE_SHIFT;
+ (op->u.setdomainmaxmem.max_memkb)>> (PAGE_SHIFT-10);
put_domain(d);
ret = 0;
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] balloon bugfix on -TESTING
2005-07-18 6:24 [PATCH] balloon bugfix on -TESTING aq
@ 2005-07-18 7:52 ` aq
2005-07-19 7:17 ` xuehai zhang
0 siblings, 1 reply; 3+ messages in thread
From: aq @ 2005-07-18 7:52 UTC (permalink / raw)
To: xen-devel
On 7/18/05, aq <aquynh@gmail.com> wrote:
> This patch is for -testing, to fix some wrong calculates of max_pages
> and max_memkb. Now balloon problem goes away (on *testing*).
>
> Unfortunately i cannot confirm the similar fix to -unstable yesterday
> is able to fix balloon problem, since i got some troubles creating
> domU with the latest -unstable.
>
> Demonstration:
>
> $ xm list
> Name Id Mem(MB) CPU State Time(s) Console
> Domain-0 0 92 0 r---- 44.3
> tty 1 40 0 -b--- 0.9 9601
>
> $ xm balloon tty 45
> bun@dewey2:~/projects/myxen$ xm list
> Name Id Mem(MB) CPU State Time(s) Console
> Domain-0 0 92 0 r---- 45.3
> tty 1 45 0 -b--- 0.9 9601
>
> bun@dewey2:~/projects/myxen$ xm balloon tty 35
> bun@dewey2:~/projects/myxen$ xm list
> Name Id Mem(MB) CPU State Time(s) Console
> Domain-0 0 92 0 r---- 46.1
> tty 1 35 0 -b--- 0.9 9601
>
i can confirm that now (on -testing) "xm maxmem" also works :-)
bun@dewey2:~/projects/myxen$ xm list
Name Id Mem(MB) CPU State Time(s) Console
Domain-0 0 92 0 r---- 101.4
tty 3 40 0 -b--- 0.7 9603
bun@dewey2:~/projects/myxen$ xm balloon tty 62
bun@dewey2:~/projects/myxen$ xm list
Name Id Mem(MB) CPU State Time(s) Console
Domain-0 0 92 0 r---- 102.1
tty 3 60 0 -b--- 0.7 9603
bun@dewey2:~/projects/myxen$ xm maxmem tty 62
bun@dewey2:~/projects/myxen$ xm balloon tty 62
bun@dewey2:~/projects/myxen$ xm list
Name Id Mem(MB) CPU State Time(s) Console
Domain-0 0 92 0 r---- 103.2
tty 3 62 0 -b--- 0.7 9603
regards,
aq
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [PATCH] balloon bugfix on -TESTING
2005-07-18 7:52 ` aq
@ 2005-07-19 7:17 ` xuehai zhang
0 siblings, 0 replies; 3+ messages in thread
From: xuehai zhang @ 2005-07-19 7:17 UTC (permalink / raw)
To: aq; +Cc: xen-devel
Hi aq,
I tested the -testing tree by applying your patch and i can successfully balloon the domain's memory
above the initial allocation now. BTW, you can give either bytes, or m (mega bytes), or k (kilo
bytes) to the "mem=" kernel command line parameter in the "extra" option of the domain's config file.
Thanks!
Xuehai
aq wrote:
> On 7/18/05, aq <aquynh@gmail.com> wrote:
>
>>This patch is for -testing, to fix some wrong calculates of max_pages
>>and max_memkb. Now balloon problem goes away (on *testing*).
>>
>>Unfortunately i cannot confirm the similar fix to -unstable yesterday
>>is able to fix balloon problem, since i got some troubles creating
>>domU with the latest -unstable.
>>
>>Demonstration:
>>
>>$ xm list
>>Name Id Mem(MB) CPU State Time(s) Console
>>Domain-0 0 92 0 r---- 44.3
>>tty 1 40 0 -b--- 0.9 9601
>>
>>$ xm balloon tty 45
>>bun@dewey2:~/projects/myxen$ xm list
>>Name Id Mem(MB) CPU State Time(s) Console
>>Domain-0 0 92 0 r---- 45.3
>>tty 1 45 0 -b--- 0.9 9601
>>
>>bun@dewey2:~/projects/myxen$ xm balloon tty 35
>>bun@dewey2:~/projects/myxen$ xm list
>>Name Id Mem(MB) CPU State Time(s) Console
>>Domain-0 0 92 0 r---- 46.1
>>tty 1 35 0 -b--- 0.9 9601
>>
>
>
> i can confirm that now (on -testing) "xm maxmem" also works :-)
>
> bun@dewey2:~/projects/myxen$ xm list
> Name Id Mem(MB) CPU State Time(s) Console
> Domain-0 0 92 0 r---- 101.4
> tty 3 40 0 -b--- 0.7 9603
>
> bun@dewey2:~/projects/myxen$ xm balloon tty 62
> bun@dewey2:~/projects/myxen$ xm list
> Name Id Mem(MB) CPU State Time(s) Console
> Domain-0 0 92 0 r---- 102.1
> tty 3 60 0 -b--- 0.7 9603
>
> bun@dewey2:~/projects/myxen$ xm maxmem tty 62
> bun@dewey2:~/projects/myxen$ xm balloon tty 62
> bun@dewey2:~/projects/myxen$ xm list
> Name Id Mem(MB) CPU State Time(s) Console
> Domain-0 0 92 0 r---- 103.2
> tty 3 62 0 -b--- 0.7 9603
>
>
>
> regards,
> aq
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-19 7:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-18 6:24 [PATCH] balloon bugfix on -TESTING aq
2005-07-18 7:52 ` aq
2005-07-19 7:17 ` xuehai zhang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.