summaryrefslogtreecommitdiff
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-06-27 04:14:27 +0200
committerLennart Poettering <lennart@poettering.net>2013-06-27 04:17:34 +0200
commit4ad490007b70e6ac18d3cb04fa2ed92eba1451fa (patch)
tree20c7aab57b1f2722be1a057a28a6e7c16788c976 /src/core/manager.h
parentabb26902e424c4142b68ead35676028b12249b77 (diff)
core: general cgroup rework
Replace the very generic cgroup hookup with a much simpler one. With this change only the high-level cgroup settings remain, the ability to set arbitrary cgroup attributes is removed, so is support for adding units to arbitrary cgroup controllers or setting arbitrary paths for them (especially paths that are different for the various controllers). This also introduces a new -.slice root slice, that is the parent of system.slice and friends. This enables easy admin configuration of root-level cgrouo properties. This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in /dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is turned off by DevicePolicy=).
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index f0bb2eb035..68cb2e4a3d 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -27,6 +27,7 @@
#include <dbus/dbus.h>
#include "fdset.h"
+#include "cgroup-util.h"
/* Enforce upper limit how many names we allow */
#define MANAGER_MAX_NAMES 131072 /* 128K */
@@ -86,6 +87,7 @@ struct Watch {
#include "dbus.h"
#include "path-lookup.h"
#include "execute.h"
+#include "unit-name.h"
struct Manager {
/* Note that the set of units we know of is allowed to be
@@ -122,6 +124,9 @@ struct Manager {
/* Units to check when doing GC */
LIST_HEAD(Unit, gc_queue);
+ /* Units that should be realized */
+ LIST_HEAD(Unit, cgroup_queue);
+
Hashmap *watch_pids; /* pid => Unit object n:1 */
char *notify_socket;
@@ -139,7 +144,6 @@ struct Manager {
Set *unit_path_cache;
char **environment;
- char **default_controllers;
usec_t runtime_watchdog;
usec_t shutdown_watchdog;
@@ -198,7 +202,8 @@ struct Manager {
int dev_autofs_fd;
/* Data specific to the cgroup subsystem */
- Hashmap *cgroup_bondings; /* path string => CGroupBonding object 1:n */
+ Hashmap *cgroup_unit;
+ CGroupControllerMask cgroup_supported;
char *cgroup_root;
usec_t gc_queue_timestamp;
@@ -273,7 +278,6 @@ unsigned manager_dispatch_run_queue(Manager *m);
unsigned manager_dispatch_dbus_queue(Manager *m);
int manager_set_default_environment(Manager *m, char **environment);
-int manager_set_default_controllers(Manager *m, char **controllers);
int manager_set_default_rlimits(Manager *m, struct rlimit **default_rlimit);
int manager_loop(Manager *m);