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

55 Commits

Author SHA1 Message Date
Michal Schmidt
595ed347a8 unit: use safe downcasts, remove pointless casts
Always use the macros for downcasting.
Remove a few obviously pointless casts.
2012-01-16 13:34:42 +01:00
Michal Schmidt
1124fe6f01 unit: use the UNIT() macro consistently
The UNIT() macro upcasts from specific unit types to the base Unit.
Use it everywhere, rather than accessing the 'meta' member directly.
2012-01-16 13:34:42 +01:00
Michal Schmidt
ac155bb885 unit: remove union Unit
Now that objects of all unit types are allocated the exact amount of
memory they need, the Unit union has lost its purpose. Remove it.

"Unit" is a more natural name for the base unit class than "Meta", so
rename Meta to Unit.

Access to members of the base class gets simplified.
2012-01-16 13:34:42 +01:00
Michal Schmidt
7d17cfbc46 unit: reduce heap usage for unit objects
The storage of the unit objects on the heap is currently not very
efficient. For every unit object we allocate a chunk of memory as large
as the biggest unit type, although there are significant differences in
the units' real requirements.
pahole shows the following sizes of structs:
488  Target
496  Snapshot
512  Device
528  Path
560  Timer
576  Automount
1080 Socket
1160 Swap
1168 Service
1280 Mount

Usually there aren't many targets or snapshots in the system, but Device
is one of the most common unit types and for every one we waste
1280 - 512 = 768 bytes.

Fix it by allocating only the right amount for the given unit type.
On my machine (x86_64, with 39 LVM volumes) this decreases systemd's
USS (unique set size) by more than 300 KB.
2012-01-16 13:34:42 +01:00
Michal Schmidt
f6cebb3bd5 let mount and swap units log to the configured defaults
Related-to: https://bugzilla.redhat.com/show_bug.cgi?id=750032
2011-11-19 03:16:55 +01:00
Lennart Poettering
ab1f063390 exec: optionally apply cgroup attributes to the cgroups we create 2011-08-20 00:22:02 +02:00
Lennart Poettering
f975e971ac load-fragment: speed up parsing by using a perfect hash table with configuration settings built by gperf 2011-08-01 00:43:05 +02:00
Lennart Poettering
a17204af0e unit: use ESRCH as error when we don't find anybody to kill 2011-07-13 19:59:28 +02:00
Lennart Poettering
3611581ebd service: properly handle who argument on D-Bus kill calls 2011-07-12 04:05:33 +02:00
Michael Olbrich
3f85873275 swap: ignore missing /proc/swaps
Otherwise systemd reports "Failed to fully start up daemon: No such file or
directory" when swap is disabled in the kernel.
2011-06-27 14:32:44 +02:00
Lennart Poettering
ab5c3e3ff1 english: s/_per_/_by_/ 2011-06-21 19:29:44 +02:00
Lennart Poettering
6ea832a207 exec: hangup/reset/deallocate VTs in gettys
Explicitly disconnect all clients from a VT when a getty starts/finishes
(requires TIOCVHANGUP, available in 2.6.29).

Explicitly deallocate getty VTs in order to flush scrollback buffer.

Explicitly reset terminals to a defined state before spawning getty.
2011-05-18 01:07:36 +02:00
Lennart Poettering
c8f4d7642b manager: introduce IgnoreOnIsolate flag so that we can keep systemd-logger around when isolating 2011-04-16 02:03:34 +02:00
Lennart Poettering
da19d5c19f src: our lord is coverity 2011-03-31 15:35:40 +02:00
Lennart Poettering
cd25cce98f exec: drop process group kill mode since it has little use and confuses the user 2011-03-29 23:31:38 +02:00
Lennart Poettering
f6a6225e41 def: centralize definition of default timeout in one place 2011-03-17 04:02:35 +01:00
Lennart Poettering
430c18ed7f kill: always send SIGCONT after SIGTERM
When we kill a process to terminate it make sure to send SIGCONT to
ensure it is unpaused and processes the signal.
2011-03-03 23:55:30 +01:00
Kay Sievers
853856101b swap: handle "nofail" from fstab 2011-02-15 18:38:15 +01:00
Lennart Poettering
27abbe8251 mount,swap: properly add dependencies to logger if needed 2011-02-15 12:28:26 +01:00
Lennart Poettering
0a494f1ff3 exec: introduce global defaults for the standard output of services 2011-02-15 11:52:29 +01:00
Lennart Poettering
bd40a2d830 clang: fix some issues found with clang-analyzer 2011-01-22 02:19:16 +01:00
Lennart Poettering
9a57c62944 systemctl: highlight failed processes in systemctl status 2011-01-20 18:22:03 +01:00
Lennart Poettering
e2f3b44cfc service: when reloading a service fails don't fail the entire service but just the reload job 2011-01-20 13:17:22 +01:00
Lennart Poettering
ba035df230 execute: make sending of SIGKILL on shutdown optional 2011-01-18 22:55:54 +01:00
Lennart Poettering
cfcfd4aefe swap: order file-based swap devices after remount-rootfs 2010-11-22 21:06:56 +01:00
Lennart Poettering
d686d8a97b cgroup: by default, duplicate service cgroup in the cpu hierarchy 2010-11-17 21:27:53 +01:00
Lennart Poettering
6210e7fc31 manager: always pull 'following' units into transaction 2010-11-14 23:48:21 +01:00
Lennart Poettering
ead8e4788e unit: get rid of gnoreDependencyFailure= instead treat ConflictedBy= as weaker counterpart of Conflicts=, similar to Wants= vs. Requires= 2010-10-29 16:28:27 +02:00
Lennart Poettering
008d348edd swap: there's no reason not order swap after sysinit, so drop it 2010-10-28 01:30:13 +02:00
Lennart Poettering
510051fc12 swap: add only swaps listed in /etc/fstab automatically to swap.target, others should be added via .wants/ links 2010-10-26 22:58:54 +02:00
Lennart Poettering
f1a1cd6497 swap: add default cgroup to swap exec env 2010-10-26 22:06:11 +02:00
Lennart Poettering
8a0867d6c5 systemctl: introduce systemctl kill 2010-10-22 16:11:50 +02:00
Lennart Poettering
4e4343146a swap: listen for POLLPRI events on /proc/swaps if available 2010-10-18 23:09:09 +02:00
Lennart Poettering
e04aad61bb swap: major rework, use /sbin/swapon for setting up swaps, fix merging of aliased swap disks 2010-10-12 04:08:04 +02:00
Matthew Miller
fdf20a3160 manager: add missing second part of s/maintenance/failed/ 2010-08-31 00:23:34 +02:00
Lennart Poettering
81bf310edc mount: imply noauto for mount points configured with native mount files 2010-08-25 21:24:21 +02:00
Lennart Poettering
173a8d04fc mount: rework automatic mounting to follow the 'nofail' option in fstab 2010-08-25 20:37:04 +02:00
Lennart Poettering
d3689161a2 mount: add global configuration options for handling of auto mounts 2010-08-25 03:11:26 +02:00
Lennart Poettering
c4e2ceae94 dbus: follow standardized fdo PropertiesChanged signal spec 2010-08-20 02:31:54 +02:00
Lennart Poettering
d6c9574fb5 emacs: make sure nobody accidently adds tabs to our sources 2010-08-14 19:59:25 +02:00
Lennart Poettering
76143638fd swap: properly enter maintenance mode on failure 2010-08-09 22:44:52 +02:00
Lennart Poettering
5632e3743d systemctl: introduce reset-maintenance command 2010-07-19 04:08:07 +02:00
Lennart Poettering
2edd4434e5 mount: add automatic start ordering dependencies for mounts 2010-07-12 22:55:27 +02:00
Lennart Poettering
398ef8ba02 dbus: make errors reported via D-Bus more useful 2010-07-08 02:43:18 +02:00
Lennart Poettering
9e58ff9c5c manager: optionally print status updates to console on boot 2010-07-07 00:00:59 +02:00
Lennart Poettering
2c966c038d unit: simplify things a little by introducing API to add two dependencies in one step 2010-07-03 19:46:38 +02:00
Lennart Poettering
032ff4afc9 unit: shorten active state enums to make systemctl output nicer 2010-07-01 03:34:15 +02:00
Lennart Poettering
6124958c7b unit: add new abstracted maintenance state for units 2010-07-01 00:31:53 +02:00
Lennart Poettering
4cd1fbcc06 unit: get rid of various unnecessary casts 2010-06-19 16:55:49 +02:00
Lennart Poettering
a3d4e06dfa manager: get rid of destinction between running_as=system and running_as=init, as there is little value in it and we cannot really test this 2010-06-19 03:15:59 +02:00