Skip to contentSkip to conversation

layer: add more memory for Qemu machines

PATCH In review Armin Kuster 4 participants 7 messages Jun 28, 2023 – Jun 29, 2023 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 layer: add more memory for Qemu machines

---
 conf/layer.conf | 3 +++
 1 file changed, 3 insertions(+)
conf/layer.conf +3 -0
index 334a945..5f289cb 100644
@@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security"
 
 QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}"
 
+# We need more mem to run many apps in this layer
+QB_MEM="-m 2048"
+
 addpylib ${LAYERDIR}/lib oeqa
Signature · 1 line
2.34.1
#1 lore raw
Quoted 10 lines · Armin Kuster
---
 conf/layer.conf | 3 +++
 1 file changed, 3 insertions(+)
conf/layer.conf +0 -0
index 334a945..5f289cb 100644

conf/layer.conf INHERIT += "sanity-meta-security" · line 34

Quoted 7 lines
conf/layer.conf +3 -0
@@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security"
 
 QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}"
 
+# We need more mem to run many apps in this layer
+QB_MEM="-m 2048"
+
 addpylib ${LAYERDIR}/lib oeqa

Putting that unconditionally in a layer.conf is a pretty poor thing to do for usability IMO as it effectively forces that decision on anyone including the layer. There has to be a better way to handle that, at least conditionally on some override?

Cheers,

Richard

author
#2 lore raw
Quoted 14 lines · Richard Purdie
Quoted 13 lines · Armin Kuster
---
  conf/layer.conf | 3 +++
  1 file changed, 3 insertions(+)
conf/layer.conf +0 -0
index 334a945..5f289cb 100644
@@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security"
 
  QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}"
 
Quoted 8 lines

conf/layer.conf INHERIT += "sanity-meta-security" · line 34

Quoted 4 lines
conf/layer.conf +3 -0
+# We need more mem to run many apps in this layer
+QB_MEM="-m 2048"
+
  addpylib ${LAYERDIR}/lib oeqa

Putting that unconditionally in a layer.conf is a pretty poor thing to do for usability IMO as it effectively forces that decision on anyone including the layer. There has to be a better way to handle that, at least conditionally on some override?

Yep. I moved it and the other qemu params to the image instead. That patch has not been sent.

thanks,
Armin

Quoted 6 lines

Cheers,

Richard

#3 lore raw
In reply to Richard Purdie

Hi,

Quoted 14 lines · Richard Purdie
Quoted 13 lines · Armin Kuster
---
 conf/layer.conf | 3 +++
 1 file changed, 3 insertions(+)
conf/layer.conf +0 -0
index 334a945..5f289cb 100644
@@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security"
 
 QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}"
 
Quoted 9 lines

conf/layer.conf INHERIT += "sanity-meta-security" · line 34

Quoted 4 lines
conf/layer.conf +3 -0
+# We need more mem to run many apps in this layer
+QB_MEM="-m 2048"
+
 addpylib ${LAYERDIR}/lib oeqa

Putting that unconditionally in a layer.conf is a pretty poor thing to do for usability IMO as it effectively forces that decision on anyone including the layer. There has to be a better way to handle that, at least conditionally on some override?

Currently these belong logically to machine config but what about generic machine targets. Could an image config define how much memory is needed to run the image on qemu?

Cheers,

-Mikko

#4 lore raw
Quoted 27 lines · Mikko Rapeli

Hi,

Quoted 14 lines · Richard Purdie
Quoted 13 lines · Armin Kuster
---
 conf/layer.conf | 3 +++
 1 file changed, 3 insertions(+)
conf/layer.conf +0 -0
index 334a945..5f289cb 100644
@@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security"
 
 QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}"
 
Quoted 9 lines

conf/layer.conf INHERIT += "sanity-meta-security" · line 34

Quoted 4 lines
conf/layer.conf +3 -0
+# We need more mem to run many apps in this layer
+QB_MEM="-m 2048"
+
 addpylib ${LAYERDIR}/lib oeqa

Putting that unconditionally in a layer.conf is a pretty poor thing to do for usability IMO as it effectively forces that decision on anyone including the layer. There has to be a better way to handle that, at least conditionally on some override?

Quoted 3 lines

Currently these belong logically to machine config but what about generic machine targets. Could an image config define how much memory is needed to run the image on qemu?

I believe Armin did move these to the image recipe which is what we do in core in some cases for this too. I think that makes more sense.

Cheers,

Richard

#5 lore raw
In reply to Mikko Rapeli
Quoted 25 lines · Mikko Rapeli via lists.yoctoproject.org
Quoted 14 lines · Richard Purdie
Quoted 13 lines · Armin Kuster

---
conf/layer.conf | 3 +++

1 file changed, 3 insertions(+)
conf/layer.conf +0 -0
index 334a945..5f289cb 100644
@@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security"
 

QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}"

Quoted 9 lines
Quoted 4 lines
conf/layer.conf +3 -0
+# We need more mem to run many apps in this layer
+QB_MEM="-m 2048"
+

addpylib ${LAYERDIR}/lib oeqa

Putting that unconditionally in a layer.conf is a pretty poor thing to do for usability IMO as it effectively forces that decision on anyone including the layer. There has to be a better way to handle that, at least conditionally on some override?

Quoted 3 lines

Currently these belong logically to machine config but what about generic machine targets. Could an image config define how much memory is needed to run the image on qemu?

$ git grep -l  QB_MEM
classes-recipe/baremetal-image.bbclass
classes-recipe/qemuboot.bbclass
recipes-core/images/build-appliance-image_15.0.0.bb
recipes-core/images/core-image-ptest.bb
recipes-graphics/images/core-image-weston-sdk.bb
recipes-graphics/images/core-image-weston.bb
recipes-graphics/images/core-image-x11.bb
recipes-sato/images/core-image-sato-sdk.bb
recipes-sato/images/core-image-sato.bb

Yes, you can set that in an image recipe.

Ross

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

Hi,

Quoted 3 lines · Mikko Rapeli via lists.yoctoproject.org

Currently these belong logically to machine config but what about generic machine targets. Could an image config define how much memory is needed to run the image on qemu?

Done already in Message-Id: <[email protected]>, sorry for the noise...

Cheers,

-Mikko