Bug 804013 - [virtio-win][balloon] the value of balloon always 2MB bigger than the value before guest hibernate (s4)
[virtio-win][balloon] the value of balloon always 2MB bigger than the value b...
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win (Show other bugs)
6.2
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Vadim Rozenfeld
Virtualization Bugs
:
Depends On:
Blocks: 720669 761491 912287
  Show dependency treegraph
 
Reported: 2012-03-16 06:13 EDT by Mike Cao
Modified: 2015-11-22 22:35 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-21 09:43:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike Cao 2012-03-16 06:13:29 EDT
Description of problem:


Version-Release number of selected component (if applicable):
# uname -r; rpm -q qemu-kvm
2.6.32-252.el6.x86_64
qemu-kvm-0.12.1.2-2.248.el6rhev.x86_64

win2k8R2 guests

How reproducible:
100%

Steps to Reproduce:
1.start guest with -m 1024 
CLI:/usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -m 1024 -smp 4,sockets=4,cores=1,threads=1 -name win2k8-R2 -uuid e2eaca3e-e764-f57b-22f0-74f4ab8c4965 -monitor stdio -rtc base=localtime,driftfix=slew -drive file=/test/win2k8r2,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive file=/root/en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617601.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:15:af:6a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -spice port=5911,disable-ticketing -vga qxl -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -bios /bios-tttt.bin -device virtio-balloon-pci,id=balloon0
2.(qemu) balloon 700
3.After guest memory balloonning to 700,suspend the guest in the guest (s4)
4 resume the guest with the same commandline 
5.(qemu) info balloon
  
Actual results:
the value of balloon is 702 instead of 700


Expected results:
the value of balloon should be 700

Additional info:
Tried lots of times .
in step2 (qemu)balloon 500  ,after resume ,(qemu)info balloon shows 502
in step2 (qemu)balloon 600  ,after resume ,(qemu)info balloon shows 602
Comment 2 Mike Cao 2012-03-19 04:27:21 EDT
I Tried with -m =8G and balloon to 7777 then shutdown the guest .
After resume ,the guests memory change back to 8GB

Mike
Comment 3 Mike Cao 2012-03-20 06:14:50 EDT
(In reply to comment #2)
> I Tried with -m =8G and balloon to 7777 then shutdown the guest .
> After resume ,the guests memory change back to 8GB
> 
> Mike

Tried winxp w/ -m = 4G ,hit this scenario .
Comment 4 Ronen Hod 2012-03-25 10:18:39 EDT
Low priority bug, moving to RHEL6.4
Comment 5 Vadim Rozenfeld 2012-04-04 05:56:17 EDT
(In reply to comment #0)
> Description of problem:
> 
> 
> Version-Release number of selected component (if applicable):
> # uname -r; rpm -q qemu-kvm
> 2.6.32-252.el6.x86_64
> qemu-kvm-0.12.1.2-2.248.el6rhev.x86_64
> 
> win2k8R2 guests
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1.start guest with -m 1024 
> CLI:/usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -m 1024 -smp
> 4,sockets=4,cores=1,threads=1 -name win2k8-R2 -uuid
> e2eaca3e-e764-f57b-22f0-74f4ab8c4965 -monitor stdio -rtc
> base=localtime,driftfix=slew -drive
> file=/test/win2k8r2,if=none,id=drive-ide0-0-0,format=raw,cache=none -device
> ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive
> file=/root/en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617601.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw
> -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
> tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0 -device
> rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:15:af:6a,bus=pci.0,addr=0x3
> -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0
> -spice port=5911,disable-ticketing -vga qxl -device
> intel-hda,id=sound0,bus=pci.0,addr=0x4 -device
> hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -bios /bios-tttt.bin -device
> virtio-balloon-pci,id=balloon0
> 2.(qemu) balloon 700
> 3.After guest memory balloonning to 700,suspend the guest in the guest (s4)
Hi Mike,
S4 is for hibernate, you probably mean S3?
If so, could you please clarify how this bug is
correlating with the following one    https://bugzilla.redhat.com/show_bug.cgi?id=803633
where, if I read it correctly, you say that balloon is
not functional after sleep?
Thank you,
Vadim.

> 4 resume the guest with the same commandline 
> 5.(qemu) info balloon
> 
> Actual results:
> the value of balloon is 702 instead of 700
> 
> 
> Expected results:
> the value of balloon should be 700
> 
> Additional info:
> Tried lots of times .
> in step2 (qemu)balloon 500  ,after resume ,(qemu)info balloon shows 502
> in step2 (qemu)balloon 600  ,after resume ,(qemu)info balloon shows 602
Comment 6 Vadim Rozenfeld 2012-04-04 05:58:53 EDT
(In reply to comment #2)
> I Tried with -m =8G and balloon to 7777 then shutdown the guest .
> After resume ,the guests memory change back to 8GB
> 
> Mike

It's OK. qemu doesn't keep balloon size persistent between
reboots, and hibernate/resume sequences.
Best, 
Vadim.
Comment 7 Amit Shah 2012-04-04 06:22:13 EDT
(In reply to comment #6)
> (In reply to comment #2)
> > I Tried with -m =8G and balloon to 7777 then shutdown the guest .
> > After resume ,the guests memory change back to 8GB
> > 
> > Mike
> 
> It's OK. qemu doesn't keep balloon size persistent between
> reboots, and hibernate/resume sequences.

The way to test this is when re-starting  qemu, start it in stopped state, balloon some memory via the monitor, then issue 'cont' in the monitor.  Then check how much memory the resumed guest shows.  You can vary the balloon amount by any value.
Comment 8 Mike Cao 2012-04-09 03:03:23 EDT
(In reply to comment #6)
> (In reply to comment #2)
> > I Tried with -m =8G and balloon to 7777 then shutdown the guest .
> > After resume ,the guests memory change back to 8GB
> > 
> > Mike
> 
> It's OK. qemu doesn't keep balloon size persistent between
> reboots, and hibernate/resume sequences.
> Best, 
> Vadim.

Vadim ,sorry I use a wrong words 

I mean hibernate (s4) .
Comment 9 Mike Cao 2012-04-09 03:37:45 EDT
Hi, Vadim

more testing for comment #0 with virtio-win-prewhql-25
1.Tried w/ reboot ,
  after guest reboot ,the value of "(qemu)info balloon“ remains 700 .after reboot ,the balloon still works 

2.Tried w/ hibernate(s4)
  after guest resume ,the value of "(qemu)info balloon" change to 702 ,after resume ,the balloon does not work
Comment 11 Ronen Hod 2012-07-10 05:37:20 EDT
Moving to RHEL6.5, as we have more urgent issues.
Comment 12 Gal Hammer 2012-08-21 08:11:02 EDT
I tried to reproduce this bug with the latest driver's code. It seems that the current behavior is different from what was described in comment #0.

When Windows start the hibernate process the "balloon: actual" value change back to 1024 and when running qemu again and Window is resumed the value remains 1024.

The question is who is responsible for saving the allocate pages value? Is it the driver or the "hardware" (qemu)?
Comment 13 Mike Cao 2013-01-05 04:19:37 EST
(In reply to comment #12)
> I tried to reproduce this bug with the latest driver's code. It seems that
> the current behavior is different from what was described in comment #0.
> 
> When Windows start the hibernate process the "balloon: actual" value change
> back to 1024 and when running qemu again and Window is resumed the value
> remains 1024.
> 
> The question is who is responsible for saving the allocate pages value? Is
> it the driver or the "hardware" (qemu)?

I still can reproduce the orginal issue w/ virtio-win-prewhql-49 

env:
2.6.32-338.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.331.el6.x86_64
seabios-0.6.1.2-26.el6.x86_64
win2k8R2 guest

CLI:
/usr/libexec/qemu-kvm -enable-kvm -m 1024 -smp 4,sockets=4,cores=1,threads=1 -name win2k8-R2 -uuid e2eaca3e-e764-f57b-22f0-74f4ab8c4965 -monitor stdio -rtc base=localtime,driftfix=slew -drive file=win2k8R2,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive file=/home/tree.englab.nay.redhat.com/pub/windows/win2008/en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617601.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:15:af:6a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -spice port=5911,disable-ticketing -vga qxl -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0  -device virtio-balloon-pci,id=balloon -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0
Comment 15 Gal Hammer 2013-03-14 06:14:34 EDT
Hi Mike,

Your comment#13 says that my comment#12 is wrong. However, bz#894967 seems to agree with me.

Can you please help me resolve this conflict?

Thanks,

    Gal.
Comment 16 Vadim Rozenfeld 2013-03-14 06:34:29 EDT
By any chance, do we get "Low Virtual Memory" notification on resume?
What happens if after resume, when you get 702 instead of 700, you run "balloon 700". Does it work?

Cheers,
Vadim.
Comment 17 Mike Cao 2013-03-15 02:54:32 EDT
(In reply to comment #15)
> Hi Mike,
> 
> Your comment#13 says that my comment#12 is wrong. However, bz#894967 seems
> to agree with me.
> 
> Can you please help me resolve this conflict?
> 
> Thanks,
> 
>     Gal.

Hi, Gal

Might Be related to the value of '-m' set in qemu commandline .
Comment 18 Mike Cao 2013-03-15 02:55:43 EDT
(In reply to comment #16)
> By any chance, do we get "Low Virtual Memory" notification on resume?
> What happens if after resume, when you get 702 instead of 700, you run
> "balloon 700". Does it work?
> 
> Cheers,
> Vadim.

Hi, Vadim

Where Can we get "Low Virtual Memory" notification ?
Seems you are right ,I can not balloon to 700MB after guest resume .why it works before guest s4 ?
Comment 19 Vadim Rozenfeld 2013-03-15 05:07:17 EDT
try finding something like “Your system is low on virtual memory” 
in the system log. btw, it will be interesting to see if changing
the "Virtual memory" in 'Performance options" -> "Advanced" has any
effect. Another question, if you cannot inflate balloon any more, do you still able to perform deflate inflate sequence with a different value?

Regarding you question why it works before s4. It could be that some other components in the system just don't release all resources on hibernate but
allocate more memory on resume (Memory Leak).
Comment 20 Mike Cao 2013-03-15 05:32:33 EDT
(In reply to comment #19)
> try finding something like “Your system is low on virtual memory” 

Did not this in #eventvwr
> in the system log. btw, it will be interesting to see if changing
> the "Virtual memory" in 'Performance options" -> "Advanced" has any

Change the size of "Vitual memory" still hit this bug 

> effect. Another question, if you cannot inflate balloon any more, do you
> still able to perform deflate inflate sequence with a different value?
> 
> Regarding you question why it works before s4. It could be that some other
> components in the system just don't release all resources on hibernate but
> allocate more memory on resume (Memory Leak).
Sorry ,I should say the Balloon does not work after S4 ,It can not change to any value
Comment 21 Vadim Rozenfeld 2013-03-15 06:01:59 EDT
(In reply to comment #20)

> Sorry ,I should say the Balloon does not work after S4 ,It can not change to
> any value

With the latest driver? What about s3?
Comment 22 Mike Cao 2013-03-15 06:08:21 EDT
(In reply to comment #21)
> (In reply to comment #20)
> 
> > Sorry ,I should say the Balloon does not work after S4 ,It can not change to
> > any value
> 
> With the latest driver? What about s3?

using driver in virtio-win-1.6.3
Comment 23 Mike Cao 2013-03-17 23:27:55 EDT
(In reply to comment #21)
> (In reply to comment #20)
> 
> > Sorry ,I should say the Balloon does not work after S4 ,It can not change to
> > any value
> 
> With the latest driver? What about s3?

After S3 ,balloon does not work as well
Comment 24 Ronen Hod 2013-05-21 09:43:36 EDT
QE,
Is it still reproducible?
Anyhow, Closing this issue. Maybe we have a different one.
Comment 25 Mike Cao 2013-05-22 06:21:59 EDT
(In reply to Ronen Hod from comment #24)
> QE,
> Is it still reproducible?
> Anyhow, Closing this issue. Maybe we have a different one.

I can not reproduce it on virtio-win-prewhql-62,
2.6.32-358.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.359.el6.x86_64
seabios-0.6.1.2-27.el6.x86_64
sgabios-0-0.3.20110621svn.el6.x86_64
spice-server-0.12.0-12.el6.x86_64

Note You need to log in before you can comment on or make changes to this bug.