-
Notifications
You must be signed in to change notification settings - Fork 202
tuned-ppd: Fix inotify watch for performance degradation #753
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
base: master
Are you sure you want to change the base?
tuned-ppd: Fix inotify watch for performance degradation #753
Conversation
Ensure the parameters for PerformanceDegradedEventHandler are passed in the correct order.
Oh, wow, good catch, thanks! |
The inodes backing the kernfs virtual files for the attributes we watch may be dropped by the kernel due to memory exhaustion or explicit user action (sysctl vm.drop_caches). This causes inotify events to not be delivered as kernfs_notify() simply drops the event if the inode cannot be found in the kernel caches. Fix this by explicitly pinning the attributes virtual files in memory to ensure we receive inotify events.
@msizanoen1, I'm not able to reproduce the inode caching issue without the last commit applied. Could you please clarify how you're reproducing it and on what system? I tried writing "3" to |
I was able to reproduce this on a ThinkPad X1 Carbon 9th gen running Fedora 41, against the The specific problematic kernel line of code is https://github.com/torvalds/linux/blob/76b6905c11fd3c6dc4562aefc3e8c4429fefae1e/fs/kernfs/file.c#L926 (should be |
Please note that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick response and detailed instructions! I was able to reproduce the issue and can confirm that keeping the files open resolves it.
See individual commits for more details.