[Devel] [PATCH vz10 07/32] ve: add missing Kconfig selects for CONFIG_VE

Konstantin Khorenko khorenko at virtuozzo.com
Fri Aug 21 19:36:53 MSK 2026


From: Eva Kurchatova <eva.kurchatova at virtuozzo.com>

The select list of CONFIG_VE only ever named the namespaces and a few
cgroup controllers, and got away with it because everything else it needs
happened to be enabled by the RHEL and Virtuozzo x86 configs.  It is not
a property of the option itself, though: plain "make defconfig" already
gives CONFIG_VE=y with CONFIG_MEMCG=n, and building for User Mode Linux
(which we now want for KUnit) starts from yet another set of defaults.

Name the dependencies explicitly:

  NET             - NET_NS depends on it, so selecting NET_NS alone
                    yields an unmet direct dependency;
  CGROUP_SCHED    - the cpu cgroup is the per-Container task group:
                    cgroup_mark_ve_roots(), the per-Container loadavg
                    and the /proc/stat virtualization all need it;
  CGROUP_CPUACCT  - per-Container cpu statistics are read from it;
  MEMCG, MEMCG_V1 - per-Container memory limits and the /proc/meminfo,
                    /proc/vmstat and oom_score virtualization are all
                    built on the memory controller, v1 included;
  POSIX_MQUEUE    - part of the IPC environment a Container expects;
  SCHEDSTATS      - kernel/ve/vzstat.c reads task->stats.wait_start, and
                    all of struct sched_statistics sits under that option.

Fixes: 82652f8a0749 ("ve: Add ve cgroup and ve_hook subsys")
Feature: ve: ve generic structures
https://virtuozzo.atlassian.net/browse/VSTOR-134732
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 kernel/Kconfig.openvz | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/kernel/Kconfig.openvz b/kernel/Kconfig.openvz
index 9358727c1afa..7494048425a5 100644
--- a/kernel/Kconfig.openvz
+++ b/kernel/Kconfig.openvz
@@ -14,12 +14,19 @@ config VE
 	select PID_NS
 	select IPC_NS
 	select UTS_NS
+	select NET
 	select NET_NS
 	select USER_NS
 	select CGROUPS
+	select CGROUP_SCHED
+	select CGROUP_CPUACCT
+	select MEMCG
+	select MEMCG_V1
 	select CGROUP_DEVICE
 	select CGROUP_FREEZER
 	select CGROUP_PERF if PERF_EVENTS
+	select POSIX_MQUEUE
+	select SCHEDSTATS
 	help
 	  This option adds support of virtual Linux running on the original box
 	  with fully supported virtual network driver, tty subsystem and
-- 
2.47.1



More information about the Devel mailing list