Skip to contentSkip to conversation

linux-yocto: add cgroup-hugetlb config

PATCH In review Tim Orling 2 participants 3 messages Nov 15, 2020 – Nov 19, 2020

lore
Share & tools
lore

Tim Orling

author
#0 lore raw

PATCH 1/1 linux-yocto: add cgroup-hugetlb config

From: Tim Orling <[email protected]>

Add kernel config fragment for CONFIG_CGROUP_HUGETLB

This is a recommended config for Kubernetes and k8s will throw a warning if it is not present.

---
 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg | 5 +++++
 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc | 5 +++++
 recipes-kernel/linux/linux-yocto_virtualization.inc | 1 +
 3 files changed, 11 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg
 create mode 100644 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc
recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg new file +5 -0
new file mode 100644
index 0000000..417ca24
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+#
+# This requires CONFIG_HUGETLBFS
+
+CONFIG_CGROUP_HUGETLB=y
recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc new file +5 -0
new file mode 100644
index 0000000..7d1f999
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+define KFEATURE_DESCRIPTION "Enable hugetlb cgroup"
+define KFEATURE_COMPATIBILITY all
+
+kconf non-hardware cgroup-hugetlb.cfg
recipes-kernel/linux/linux-yocto_virtualization.inc +1 -0
index f050b3f..42a10b3 100644
@@ -5,6 +5,7 @@ SRC_URI += "file://xt-checksum.scc \
 	    file://vswitch.scc \
 	    file://lxc.scc \
             file://docker.scc \
+	    file://cgroup-hugetlb.scc \
 	    "
 KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'features/kvm/qemu-kvm-enable.scc', '', d)}"
 
Signature · 1 line
2.25.0
#1 lore raw

In message: [meta-virtualization][PATCH] linux-yocto: add cgroup-hugetlb config

Quoted 6 lines · on 14/11/2020 Tim Orling wrote:

From: Tim Orling <[email protected]>

Add kernel config fragment for CONFIG_CGROUP_HUGETLB

This is a recommended config for Kubernetes and k8s will throw a warning if it is not present.

In my k3s-wip branch, I have a series of kernel configs directly related and named for kubernetes .. I had hoped to just merge this into that effort, but as you can see from my posts, getting k3s done is taking longer than I wanted.

So I've gone ahead and merged this, and I'll consolidate them later when I finish k3s.

Bruce

Quoted 51 lines
---
 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg | 5 +++++
 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc | 5 +++++
 recipes-kernel/linux/linux-yocto_virtualization.inc | 1 +
 3 files changed, 11 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg
 create mode 100644 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc
recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg new file +5 -0
new file mode 100644
index 0000000..417ca24
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+#
+# This requires CONFIG_HUGETLBFS
+
+CONFIG_CGROUP_HUGETLB=y
recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc new file +5 -0
new file mode 100644
index 0000000..7d1f999
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+define KFEATURE_DESCRIPTION "Enable hugetlb cgroup"
+define KFEATURE_COMPATIBILITY all
+
+kconf non-hardware cgroup-hugetlb.cfg
recipes-kernel/linux/linux-yocto_virtualization.inc +1 -0
index f050b3f..42a10b3 100644
@@ -5,6 +5,7 @@ SRC_URI += "file://xt-checksum.scc \
 	    file://vswitch.scc \
 	    file://lxc.scc \
             file://docker.scc \
+	    file://cgroup-hugetlb.scc \
 	    "
 KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'features/kvm/qemu-kvm-enable.scc', '', d)}"
 
Signature · 1 line
2.25.0
author
#2 lore raw
Quoted 11 lines · Bruce Ashfield

In message: [meta-virtualization][PATCH] linux-yocto: add cgroup-hugetlb config

Quoted 6 lines · on 14/11/2020 Tim Orling wrote:

From: Tim Orling <[email protected]>

Add kernel config fragment for CONFIG_CGROUP_HUGETLB

This is a recommended config for Kubernetes and k8s will throw a warning if it is not present.

Quoted 9 lines

In my k3s-wip branch, I have a series of kernel configs directly related and named for kubernetes .. I had hoped to just merge this into that effort, but as you can see from my posts, getting k3s done is taking longer than I wanted.

So I've gone ahead and merged this, and I'll consolidate them later when I finish k3s.

Thank you.
I am likewise not convinced this is the final version of this, but it is what is working for me now.

Bruce

Quoted 58 lines
Quoted 11 lines
---
 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg | 5 +++++
 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc | 5 +++++
 recipes-kernel/linux/linux-yocto_virtualization.inc | 1 +
 3 files changed, 11 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg
 create mode 100644 recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc

Review

Quoted 1 line
(quoted diff) +0 -0

b/recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg

Review

Quoted 11 lines

new file mode 100644
index 0000000..417ca24

recipes-kernel/linux/linux-yocto/cgroup-hugetlb.cfg new file +5 -0
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+#
+# This requires CONFIG_HUGETLBFS
+
+CONFIG_CGROUP_HUGETLB=y
(quoted diff) +0 -0

b/recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc

Review

Quoted 11 lines

new file mode 100644
index 0000000..7d1f999

recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc new file +5 -0
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+define KFEATURE_DESCRIPTION "Enable hugetlb cgroup"
+define KFEATURE_COMPATIBILITY all
+
+kconf non-hardware cgroup-hugetlb.cfg
(quoted diff) +0 -0

b/recipes-kernel/linux/linux-yocto_virtualization.inc

recipes-kernel/linux/linux-yocto_virtualization.inc SRC_URI += "file://xt-checksum.scc \ · line 10

Quoted 10 lines

index f050b3f..42a10b3 100644

recipes-kernel/linux/linux-yocto_virtualization.inc +1 -0
@@ -5,6 +5,7 @@ SRC_URI += "file://xt-checksum.scc \
          file://vswitch.scc \
          file://lxc.scc \
             file://docker.scc \
+         file://cgroup-hugetlb.scc \
          "
 KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES',

'kvm', 'features/kvm/qemu-kvm-enable.scc', '', d)}"

Quoted 8 lines
recipes-kernel/linux/linux-yocto_virtualization.inc +0 -1
--

2.25.0