| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
This change checks each swap partition or file reported in /proc/swaps
to see if it matches the values configured with resume= and
resume_offset= kernel parameters. If a match is found, the matching swap
entry is used as the hibernation location regardless of swap priority.
|
|
|
|
|
| |
These were clearly intended to be "%m" to display the human readable version
of the error stored in errno.
|
|\
| |
| | |
cgroup: introduce support for cgroup v2 CPUSET controller
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce support for configuring cpus and mems for processes using
cgroup v2 CPUSET controller. This allows users to limit which cpus
and memory NUMA nodes can be used by processes to better utilize
system resources.
The cgroup v2 interfaces to control it are cpuset.cpus and cpuset.mems
where the requested configuration is written. However, it doesn't mean
that the requested configuration will be actually used as parent cgroup
may limit the cpus or mems as well. In order to reflect the real
configuration cgroup v2 provides read-only files cpuset.cpus.effective
and cpuset.mems.effective which are exported to users as well.
|
|/ |
|
|
|
|
| |
Reported/found by Coccinelle
|
|
|
|
|
|
| |
The "Ex" variant was originally only added for ExecStartXYZ= but it makes
sense to have feature parity for the rest of the exec command properties
as well (e.g. ExecReload=, ExecStop=, etc).
|
|\
| |
| | |
Two or more refactoring patches
|
| |
| |
| |
| |
| |
| |
| | |
This function had two users (apart from tests), and both only used one
argument. And it seems likely that if we need to pass more directories,
either the _nulstr() or the _strv() form would be used. Let's simplify
the code.
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
bus_open_system_watch_bind_with_description()
https://bugzilla.redhat.com/show_bug.cgi?id=1746057
This only affects systemd-resolved. bus_open_system_watch_bind_with_description()
is also used in timesyncd, but it has no methods, only read-only properties, and
in networkd, but it annotates all methods with SD_BUS_VTABLE_UNPRIVILEGED and does
polkit checks.
|
| | | |
|
| | |
| | |
| | |
| | | |
Fixes #13380.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When we would iterate over the lookup paths for each unit, making the list as
short as possible was important for performance. With the current cache, it
doesn't matter much. Two classes of paths were being removed:
- paths which don't exist in the filesystem
- paths which symlink to a path earlier in the search list
Both of those points cause problems with the caching code:
- if a user creates a directory that didn't exist before and puts units there,
now we will notice the new mtime an properly load the unit. When the path
was removed from list, we wouldn't.
- we now properly detect whether a unit path is on the path or not.
Before, if e.g. /lib/systemd/system, /usr/lib/systemd/systemd were both on
the path, and /lib was a symlink to /usr/lib, the second directory would be
pruned from the path. Then, the code would think that a symlink
/etc/systemd/system/foo.service→/lib/systemd/system/foo.service is an alias,
but /etc/systemd/system/foo.service→/usr/lib/systemd/system/foo.service would
be considered a link (in the systemctl link sense).
Removing the pruning has a slight negative performance impact in case of
usr-merge systems which have systemd compiled with non-usr-merge paths.
Non-usr-merge systems are deprecated, and this impact should be very small, so
I think it's OK. If it turns out to be an issue, the loop in function that
builds the cache could be improved to skip over "duplicate" directories with
same logic that the cache pruning did before. I didn't want to add this,
becuase it complicates the code to improve a corner case.
Fixes #13272.
|
| |
| |
| |
| |
| |
| | |
The file descriptor was opened with O_CLOEXEC, so in practice this doesn't
change too much, but it seems cleaner to always close the old fd when
changing the device path.
|
|\ \
| | |
| | | |
systemd-analyze cat-config relabel-extra.d/
|
| |/ |
|
| |
| |
| |
| |
| | |
Some architectures need the arguments to be reordered because of alignment
issues. Otherwise, it's the same as sync_file_range.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
→ EXTRACT_UNQUOTE"
This reverts commit 8a07b4033e5d3c86931b3dd2ddbca41118c05c60.
The tests are kept. test-networkd-conf is adjusted to pass.
This fixes #13276. I think current rules are extremely confusing, as the
case in test-networkd-conf shows. We apply some kinds of unescaping (relating
to quoting), but not others (related to escaping of special characters).
But fixing this is hard, because people have adjusted quoting to match
our rules, and if we make the rules "better", things might break in unexpected
places.
|
| |
|
|
|
|
|
|
|
| |
I assumed that unit_name_to_instnace() returns NULL if there is no instance.
In fact it returns "", so the check for instance was wrong.
Also avoid unnecessary call to unit_name_is_valid().
|
| |
|
| |
|
|
|
|
|
|
|
| |
FLAGS_SET() is the wrong operator here, because we want to see if
*any* bits are set. Add test.
https://github.com/systemd/systemd/pull/12884#issuecomment-518238410
|
|
|
|
| |
Fixes coverity issue 1403820
|
|\
| |
| | |
Rework unit loading to take into account all aliases
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
v2:
- do not watch mtime of transient and generated dirs
We'd reload the map after every transient unit we created, which we don't
need to do, since we create those units ourselves and know their fragment
path.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reworks how we load units from disk. Instead of chasing symlinks every
time we are asked to load a unit by name, we slurp all symlinks from disk
and build two hashmaps:
1. from unit name to either alias target, or fragment on disk
(if an alias, we put just the target name in the hashmap, if a fragment
we put an absolute path, so we can distinguish both).
2. from a unit name to all aliases
Reading all this data can be pretty costly (40 ms) on my machine, so we keep it
around for reuse.
The advantage is that we can reliably know what all the aliases of a given unit
are. This means we can reliably load dropins under all names. This fixes #11972.
|
| |
| |
| |
| |
| |
| |
| |
| | |
It turns out most possible symlinks are invalid, because the type has to match,
and template units can only be linked to template units.
I'm not sure if the existing code made the same checks consistently. At least
I don't see the same rules expressed in a single place.
|
| | |
|
|\ \
| | |
| | | |
quick follow-up for the symbolic exit status PR #13207
|
| | |
| | |
| | |
| | |
| | | |
After all these two exit codes are defined by ISO C as part of the C
library, and it's not the GNU implementation defines them.
|
|\ \ \
| | | |
| | | | |
port "busctl list" to format-table.h
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
specified column is reached
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This should make various calls easier that currently generate either an
empty cell or a regular cell depending on whether they have data to
show.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
For some cases it might make sense to show "-" instead of just spaces
for empty cells.
|
|\ \ \ \
| |_|/ /
|/| | | |
networkctl cleanups and improvements
|
| | | | |
|
| | | | |
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
Symbolic exit code names
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
{RestartPrevent,RestartForce,Success}ExitStatus
We were passing 1/4th of the size in bytes as argument. So depending
on the size of the array, either we'd only transfer a subset of values,
or we'd get an alignment error.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With SYSTEMD_LOG_LOCATION=1, it is much more useful to see the location
where the call to bus_log_{parse,create}_error() was made, rather then
the one-line body of the helper function. Also, it's our internal code,
so having a one-line non-inline function doesn't make much sense anyway.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I opted to embed the Bitmap structure directly in the ExitStatusSet.
This means that memory usage is a bit higher for units which don't define
this setting:
Service changes:
/* size: 2720, cachelines: 43, members: 73 */
/* sum members: 2680, holes: 9, sum holes: 39 */
/* sum bitfield members: 7 bits, bit holes: 1, sum bit holes: 1 bits */
/* last cacheline: 32 bytes */
/* size: 2816, cachelines: 44, members: 73 */
/* sum members: 2776, holes: 9, sum holes: 39 */
/* sum bitfield members: 7 bits, bit holes: 1, sum bit holes: 1 bits */
But this way the code is simpler and we do less pointer chasing.
|
| | | |
|