Skip to contentSkip to conversation

xen: expand BALLOON_MEMORY_HOTPLUG description

PATCH In review Roger Pau Monne 3 participants 8 messages Mar 24, 2020 – Mar 26, 2020 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 xen: expand BALLOON_MEMORY_HOTPLUG description

To mention it's also useful for PVH or HVM domains that require mapping foreign memory or grants.

---
Cc: Boris Ostrovsky <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: [email protected]

---
 drivers/xen/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)
drivers/xen/Kconfig +4 -0
index 61212fc7f0c7..57ddd6f4b729 100644
@@ -19,6 +19,10 @@ config XEN_BALLOON_MEMORY_HOTPLUG
 	  It is very useful on critical systems which require long
 	  run without rebooting.
 
+	  It's also very useful for translated domains (PVH or HVM) to obtain
+	  unpopulated physical memory ranges to use in order to map foreign
+	  memory or grants.
+
 	  Memory could be hotplugged in following steps:
 
 	    1) target domain: ensure that memory auto online policy is in
Signature · 1 line
2.25.0
#1 lore raw

PATCH 2/2 xen: enable BALLOON_MEMORY_HOTPLUG by default

Without it a PVH dom0 is mostly useless, as it would balloon down huge amounts of RAM in order get physical address space to map foreign memory and grants, ultimately leading to an out of memory situation.

Such option is also needed for HVM or PVH driver domains, since they also require mapping grants into physical memory regions.

---
Cc: Boris Ostrovsky <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: [email protected]

---
 drivers/xen/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/xen/Kconfig +1 -0
index 57ddd6f4b729..c344bcffd89d 100644
@@ -13,6 +13,7 @@ config XEN_BALLOON
 config XEN_BALLOON_MEMORY_HOTPLUG
 	bool "Memory hotplug support for Xen balloon driver"
 	depends on XEN_BALLOON && MEMORY_HOTPLUG
+	default y
 	help
 	  Memory hotplug support for Xen balloon driver allows expanding memory
 	  available for the system above limit declared at system startup.
Signature · 1 line
2.25.0
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] xen: enable BALLOON_MEMORY_HOTPLUG by default

Quoted 24 lines · Roger Pau Monne

Without it a PVH dom0 is mostly useless, as it would balloon down huge amounts of RAM in order get physical address space to map foreign memory and grants, ultimately leading to an out of memory situation.

Such option is also needed for HVM or PVH driver domains, since they also require mapping grants into physical memory regions.

---
Cc: Boris Ostrovsky <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: [email protected]

---
  drivers/xen/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/xen/Kconfig +0 -0
index 57ddd6f4b729..c344bcffd89d 100644

drivers/xen/Kconfig config XEN_BALLOON · line 19

Quoted 7 lines
drivers/xen/Kconfig +1 -0
@@ -13,6 +13,7 @@ config XEN_BALLOON
  config XEN_BALLOON_MEMORY_HOTPLUG
  	bool "Memory hotplug support for Xen balloon driver"
  	depends on XEN_BALLOON && MEMORY_HOTPLUG
+	default y
  	help
  	  Memory hotplug support for Xen balloon driver allows expanding memory
  	  available for the system above limit declared at system startup.

Another variant would be to set: default XEN_BACKEND

This would match the reasoning for switching it on.

Either way would be fine with me, so you can add

Juergen

#3 lore raw

Re: [PATCH 2/2] xen: enable BALLOON_MEMORY_HOTPLUG by default

Quoted 35 lines · Jürgen Groß
Quoted 24 lines · Roger Pau Monne

Without it a PVH dom0 is mostly useless, as it would balloon down huge amounts of RAM in order get physical address space to map foreign memory and grants, ultimately leading to an out of memory situation.

Such option is also needed for HVM or PVH driver domains, since they also require mapping grants into physical memory regions.

---
Cc: Boris Ostrovsky <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: [email protected]

---
  drivers/xen/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/xen/Kconfig +0 -0
index 57ddd6f4b729..c344bcffd89d 100644

drivers/xen/Kconfig config XEN_BALLOON · line 19

Quoted 7 lines
drivers/xen/Kconfig +1 -0
@@ -13,6 +13,7 @@ config XEN_BALLOON
  config XEN_BALLOON_MEMORY_HOTPLUG
  	bool "Memory hotplug support for Xen balloon driver"
  	depends on XEN_BALLOON && MEMORY_HOTPLUG
+	default y
  	help
  	  Memory hotplug support for Xen balloon driver allows expanding memory
  	  available for the system above limit declared at system startup.

Another variant would be to set: default XEN_BACKEND

Quoted 1 line

This would match the reasoning for switching it on.

I would rather have it always on if possible, as gntdev or privcmd (when used to map foreign pages from user-space) will also require it, and they are not gated on XEN_BACKEND AFAICT.

Quoted 3 lines

Either way would be fine with me, so you can add

Thanks!

Roger.

#4 lore raw

Re: [PATCH 2/2] xen: enable BALLOON_MEMORY_HOTPLUG by default

Roger Pau Monne writes ("Re: [PATCH 2/2] xen: enable BALLOON_MEMORY_HOTPLUG by default"):

Quoted 3 lines

I would rather have it always on if possible, as gntdev or privcmd (when used to map foreign pages from user-space) will also require it, and they are not gated on XEN_BACKEND AFAICT.

Currently there seem to be problems with this:

http://logs.test-lab.xenproject.org/osstest/logs/149014/test-amd64-amd64-dom0pvh-xl-intel/info.html

For now I have rolled back the change in osstest to enable this option explicitly.

Ian.

maintainer Reviewed-by on v1 1/2
#5 lore raw
In reply to Roger Pau Monne
Quoted 18 lines · Roger Pau Monne

To mention it's also useful for PVH or HVM domains that require mapping foreign memory or grants.

---
Cc: Boris Ostrovsky <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: [email protected]

---
  drivers/xen/Kconfig | 4 ++++
  1 file changed, 4 insertions(+)
drivers/xen/Kconfig +0 -0
index 61212fc7f0c7..57ddd6f4b729 100644

drivers/xen/Kconfig config XEN_BALLOON_MEMORY_HOTPLUG · line 22

Quoted 4 lines
drivers/xen/Kconfig +1 -0
@@ -19,6 +19,10 @@ config XEN_BALLOON_MEMORY_HOTPLUG
  	  It is very useful on critical systems which require long
  	  run without rebooting.
 
+	  It's also very useful for translated domains (PVH or HVM) to obtain

I'd rather say "(non PV)" or "(PVH, HVM or Arm)".

drivers/xen/Kconfig config XEN_BALLOON_MEMORY_HOTPLUG · line 28

Quoted 7 lines
drivers/xen/Kconfig +3 -0
+	  unpopulated physical memory ranges to use in order to map foreign
+	  memory or grants.
+
  	  Memory could be hotplugged in following steps:
 
  	    1) target domain: ensure that memory auto online policy is in

With that:

Juergen

#6 lore raw
Quoted 14 lines · Jürgen Groß
Quoted 13 lines · Roger Pau Monne

To mention it's also useful for PVH or HVM domains that require mapping foreign memory or grants.

---
Cc: Boris Ostrovsky <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: [email protected]

---
  drivers/xen/Kconfig | 4 ++++
  1 file changed, 4 insertions(+)
Quoted 10 lines

drivers/xen/Kconfig config XEN_BALLOON_MEMORY_HOTPLUG · line 21

Quoted 8 lines
drivers/xen/Kconfig +1 -0
index 61212fc7f0c7..57ddd6f4b729 100644
@@ -19,6 +19,10 @@ config XEN_BALLOON_MEMORY_HOTPLUG
  	  It is very useful on critical systems which require long
  	  run without rebooting.
+	  It's also very useful for translated domains (PVH or HVM) to obtain

I'd rather say "(non PV)" or "(PVH, HVM or Arm)".

I'm fine with any of the variants. Would you mind adjusting when picking it up or would you like me to resend?

Quoted 10 lines

drivers/xen/Kconfig config XEN_BALLOON_MEMORY_HOTPLUG

Quoted 6 lines
drivers/xen/Kconfig +3 -0
+	  unpopulated physical memory ranges to use in order to map foreign
+	  memory or grants.
+
  	  Memory could be hotplugged in following steps:
  	    1) target domain: ensure that memory auto online policy is in
 

With that:

Thanks!

maintainer
#7 lore raw
Quoted 26 lines · Roger Pau Monné
Quoted 14 lines · Jürgen Groß
Quoted 13 lines · Roger Pau Monne

To mention it's also useful for PVH or HVM domains that require mapping foreign memory or grants.

---
Cc: Boris Ostrovsky <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: [email protected]

---
   drivers/xen/Kconfig | 4 ++++
   1 file changed, 4 insertions(+)
Quoted 10 lines

drivers/xen/Kconfig config XEN_BALLOON_MEMORY_HOTPLUG · line 21

Quoted 8 lines
drivers/xen/Kconfig +1 -0
index 61212fc7f0c7..57ddd6f4b729 100644
@@ -19,6 +19,10 @@ config XEN_BALLOON_MEMORY_HOTPLUG
   	  It is very useful on critical systems which require long
   	  run without rebooting.
+	  It's also very useful for translated domains (PVH or HVM) to obtain

I'd rather say "(non PV)" or "(PVH, HVM or Arm)".

Quoted 2 lines

I'm fine with any of the variants. Would you mind adjusting when picking it up or would you like me to resend?

No need to resend. I'll use the "non PV" variant.

Juergen