Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#1793533) Don't emit PropertiesChanged signal needlessly #113

Merged
merged 2 commits into from Aug 6, 2020
Merged

(#1793533) Don't emit PropertiesChanged signal needlessly #113

merged 2 commits into from Aug 6, 2020

Conversation

msekletar
Copy link
Member

No description provided.

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 2e129d5)

Resolves: #1793533
Copy link
Contributor

@jsynacek jsynacek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jsynacek jsynacek assigned jsynacek and unassigned jsynacek Aug 6, 2020
@jsynacek jsynacek merged commit a4cefc9 into redhat-plumbers:master Aug 6, 2020
@gleventhal
Copy link

I'm not sure if you understand just how much impact this change really has for me, but just let me say thank you!

For systems with busy automount activity, this behavior leads to SSH / session timeouts and CPU load as backlogged work and systemd/dbus/journald contend heavily for CPU when dbus gets exhausted (while iterating over >= ~3000 mounts).

Thanks for fixing this!

@mergify mergify bot added the pr/needs-ci Formerly needs-ci label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/needs-ci Formerly needs-ci released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants