summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Sekletár <msekleta@redhat.com>2020-03-26 13:35:11 +0100
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>2021-04-12 16:25:18 +0200
commit2fae186907b27b0c4a6d8d65d6e545f50dbda5e2 (patch)
tree8a8eb4dbc8530753492e08b063394bf42bea78bf
parent5dd06cc43afba6364fad3aed8e857f6203078713 (diff)
downloadsystemd-2fae186907b27b0c4a6d8d65d6e545f50dbda5e2.tar.gz
device: don't emit PropetiesChanged needlessly
Functions called from device_setup_unit() already make sure that unit is enqueued in case it is a new unit or properties exported on the bus have changed. This should prevent unnecessary DBus wakeups and associated DBus traffic when device_setup_unit() was called while reparsing /proc/self/mountinfo due to the mountinfo notifications. Note that we parse /proc/self/mountinfo quite often on the busy systems (e.g. k8s container hosts) but majority of the time mounts didn't change, only some mount got added. Thus we don't need to generate PropertiesChanged for devices associated with the mounts that didn't change. Thanks to Renaud Métrich <rmetrich@redhat.com> for debugging the problem and providing draft version of the patch. (cherry picked from commit 2e129d5d6bd6bd8be4b5359e81a880cbf72a44b8) Resolves: #1946671
-rw-r--r--src/core/device.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 21fe3802bd..021c28dfbd 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -549,9 +549,6 @@ static int device_setup_unit(Manager *m, struct udev_device *dev, const char *pa
if (dev && device_is_bound_by_mounts(DEVICE(u), dev))
device_upgrade_mount_deps(u);
- /* Note that this won't dispatch the load queue, the caller has to do that if needed and appropriate */
- unit_add_to_dbus_queue(u);
-
return 0;
fail: