1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
Commit Graph

15 Commits

Author SHA1 Message Date
Kay Sievers
7759ecb21e silent a few more gcc warnings 2013-10-21 18:40:33 +02:00
Lennart Poettering
71fda00f32 list: make our list macros a bit easier to use by not requring type spec on each invocation
We can determine the list entry type via the typeof() gcc construct, and
so we should to make the macros much shorter to use.
2013-10-14 06:11:19 +02:00
Lennart Poettering
ddca82aca0 cgroup: get rid of MemorySoftLimit=
The cgroup attribute memory.soft_limit_in_bytes is unlikely to stay
around in the kernel for good, so let's not expose it for now. We can
readd something like it later when the kernel guys decided on a final
API for this.
2013-09-17 14:58:00 -05:00
Gao feng
6f68ecb450 cgroup: setup BlockIODeviceWeight in bus_cgroup_set_property
This patch adds the support for setting up BlockIODeviceWeight
in bus_cgroup_set_property. most of the codes are copied from
the case that sets up DeviceAllow.
2013-09-10 18:24:34 +02:00
Lennart Poettering
06eb4e3bf8 cgroup: compare fs paths with path_equal() rather than streq() 2013-09-10 18:21:10 +02:00
Gao feng
f004c2ca11 cgroup: setup BlockIORead/WriteBandwidth in bus_cgroup_set_property
This patch adds the support for setting up BlockIORead/WriteBandwidth
in bus_cgroup_set_property.
2013-09-10 17:23:07 +02:00
Gao feng
ad7bfffde5 device cgroup: don't create a new CGroupDeviceAllow when it already in the list
If a device node is already in the device_allow list of
CGroupContext, we should replace it instead of create a
new one and append this new one to the end of device_allow
list.

change from v1: use streq to replace !strcmp
2013-08-28 08:04:56 -04:00
Gao feng
f236910365 blkio: fix incorrect setting of cpu_shares
We should set up blockio_weight not cpu_shares.
2013-08-23 12:48:14 -04:00
Lennart Poettering
b9ec935936 core: simplify drop-in writing logic a bit
let's make use of some format string magic!
2013-07-11 21:29:33 +02:00
Lennart Poettering
665f8316f4 core: when writing drop-in files, name them directly after the property we set
Mapping from "FooBar" to "foo-bar" is unnecessary and makes it hard to
handle many different properties with the same code, hence, let's just
not do it.
2013-07-11 21:03:06 +02:00
Lennart Poettering
c2756a6840 core: add transient units
Transient units can be created via the bus API. They are configured via
the method call parameters rather than on-disk files. They are subject
to normal GC. Transient units currently may only be created for
services (however, we will extend this), and currently only ExecStart=
and the cgroup parameters can be configured (also to be extended).

Transient units require a unique name, that previously had no
configuration file on disk.

A tool systemd-run is added that makes use of this functionality to run
arbitrary command lines as transient services:

$ systemd-run /bin/ping www.heise.de

Will cause systemd to create a new transient service and run ping in it.
2013-06-28 04:12:58 +02:00
Lennart Poettering
7041efe960 dbus: make DeviceAllow=/DevicePolicy= writable 2013-06-27 23:13:17 +02:00
Lennart Poettering
b42defe3b8 dbus: make more cgroup attributes runtime settable 2013-06-27 21:50:35 +02:00
Lennart Poettering
8e2af47840 dbus: add infrastructure for changing multiple properties at once on units and hook some cgroup attributes up to it
This introduces two bus calls to make runtime changes to selected bus
properties, optionally with persistence.

This currently hooks this up only for three cgroup atributes, but this
brings the infrastructure to add more changable attributes.

This allows setting multiple attributes at once, and takes an array
rather than a dictionary of properties, in order to implement simple
resetting of lists using the same approach as when they are sourced from
unit files. This means, that list properties are appended to by this
call, unless they are first reset via assigning the empty list.
2013-06-27 21:14:56 +02:00
Lennart Poettering
4ad490007b 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=).
2013-06-27 04:17:34 +02:00