Skip to content

RFC cgroups: support for module-loadable subsystems

Ben Blum containers lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3cgroups: revamp subsys arrayinclude/linux/cgroup.h kernel/cgroup.c+81 -180 replies
2/3cgroups: subsystem module interfaceinclude/linux/cgroup.h kernel/cgroup.c+96 -03 replies
3/3cgroups: net_cls subsys as modulenet/sched/Kconfig net/sched/cls_cgroup.c+29 -102 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/3] cgroups: support for module-loadable subsystems

This patch series implements simple support for building and loading subsystems as modules, both within and outside the kernel source tree. Module unloading is as yet unimplemented - it will require more advanced reference counting in the mount/unmount code, and I plan to work on this soon.

Patch #1 sets up the subsys[] array so its contents can be dynamic as modules appear and (eventually) disappear. I introduce an rwsem called subsys_mutex to protect against concurrent loads/unloads/reads, and modify iterations over the array to handle when subsystems are absent.

Patch #2 implements an interface for modules to load subsystems, called cgroup_load_subsys, similar to cgroup_init_subsys, and adds a module pointer in struct cgroup_subsys.

Patch #3 modifies the net_cls subsystem, which already had some module declarations, to be configurable as a module, which also serves as a simple proof-of-concept.

-- bblum