All of lore.kernel.org
 help / color / mirror / Atom feed
* hv_balloon: Only works in ubuntu
@ 2022-06-11 15:40 Florian Müller
  2022-06-11 17:36 ` Michael Kelley (LINUX)
  0 siblings, 1 reply; 13+ messages in thread
From: Florian Müller @ 2022-06-11 15:40 UTC (permalink / raw)
  To: linux-hyperv

Hello there,

I'm trying to debug several, probably related issues to your hv_balloon kernel module. 

All tests are done on Win11 21H2 (22000.675) pro, on a Ryzen 3950x with active AMD-V, and 64GB of memory.
An updated Ubuntu Server 20.04 Guest is used for comparison. It's currently running kernel 5.13.0-1023-azure, configured with 1GB memory to start, and active ballooning between 512MB and 32GB of memory. Memory hot-plugging and -unplugging works.

Issues showed up when I set up a Kali Linux Guest. I missed the memory configuration before booting up the instance, so it started with 1GB of memory, and ballooning active between 512MB and several TB of memory. Hyper-V started to allocate more and more memory to this guest since the reported memory requirements also increased. The guest kernel didn't see any of that allocated memory, as far as I can tell. 

This is clearly reproduceable on at least 2 Hyper-V hosts, with current live images of Debian (Bullseye) and Kali Linux, but not with Ubuntu 20.04 or 22.04.
(Get the Kali live image, create a new guest (version 10), turn off secure boot and boot from that image. It takes 3-5 minutes until the issue is visible in the hyper-v console.) 

After running more tests with different memory settings for ballooning, I am pretty sure:
- Hyper-V respects the maximum setting for the memory balloon. Although it doesn't care if there's enough memory.
- Guests can't use/see more memory than they had while booting up.
- Guests can unplug memory.
- Guests can hotplug previously unplugged memory up to their starting amount.
- The reported values seem to be off: After compiling a kernel on Kali (and cooling down), the guest kernel shows a total of 3207MB memory, with 294MB used, 137MB free, 2775MB buffers/caches and 2611MB available. Hyper-V reports 4905MB required and 5840MB allocated. 
- As of kernel 5.17.11, the issue is not solved.

To sum up: I could use memory ballooning if I set the initial memory size to the maximum size and wait until it got freed up. 

There are several reports out there about what looks like a memory leak, without a solution. 

I'm currently comparing the kernel built by canonical with the kali kernel, but as I am not really a developer, I'm not sure if I could even find the difference if there is one. So, I'm calling (and hoping) for help, and offering any support when it comes to testing. I can apply patches, build kernel packages and read logs if that helps.

Thx-a-lot!
Flo

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-06-14 17:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-11 15:40 hv_balloon: Only works in ubuntu Florian Müller
2022-06-11 17:36 ` Michael Kelley (LINUX)
2022-06-11 17:58   ` AW: " Florian Müller
2022-06-11 19:30     ` Michael Kelley (LINUX)
2022-06-11 19:44       ` AW: " Florian Müller
2022-06-13  0:56         ` Michael Kelley (LINUX)
2022-06-13  7:58           ` Vitaly Kuznetsov
2022-06-13  8:47             ` David Hildenbrand
2022-06-13  8:53             ` AW: " Florian M?ller
2022-06-13  9:29               ` David Hildenbrand
2022-06-13 14:04               ` Michael Kelley (LINUX)
2022-06-13 14:45                 ` AW: " Florian M?ller
2022-06-14 17:01                   ` Michael Kelley (LINUX)

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.