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

PR Rollup #92

Merged
merged 16 commits into from May 1, 2023
Merged

PR Rollup #92

merged 16 commits into from May 1, 2023

Conversation

mmstick
Copy link
Member

@mmstick mmstick commented Apr 30, 2023

Fixes

  • daemon: Early return on a kernel lacking SCHED_DEBUG which causes the service to not start
  • daemon: Spawns the pipewire monitoring sub-process with /proc/self/exe
  • pipewire: Prevents duplicate threads being spawned to monitor the same pipewire socket

Improvements

  • Significant reduction in total memory and CPU consumption
    • Much faster access to process info from a PID lookup
    • Reduced heap allocations in hot paths for new process assignments
    • Added a garbage collection method to be called periodically

Chores

  • config: Added schedtool to exceptions
  • config: Added gamescope and some game launchers
  • daemon: Some additional debug and trace logs
  • just: Auto-detect path of execsnoop
  • just: Use lld linker if available
  • nix: Adds Nix flake

Closes #91

@mmstick mmstick requested review from a team May 1, 2023 15:03
@jacobgkau jacobgkau assigned jacobgkau and unassigned jacobgkau May 1, 2023
@jacobgkau
Copy link
Member

This built fine locally, but has not built successfully on the build server. The logs have been cycled out, so I can't see what the problem was.

@mmstick
Copy link
Member Author

mmstick commented May 1, 2023

Maybe it'll build on the server this time

@mmstick
Copy link
Member Author

mmstick commented May 1, 2023

Successfully built this time

Copy link
Member

@jacobgkau jacobgkau left a comment

Choose a reason for hiding this comment

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

Regression testing passed:

  • Focus-based assignments are working with the default config (both .debs and Flatpaks).
  • Focus-based assignments work with custom values in /etc.
  • nice -n # works with the default config.
  • A custom profile with no niceness defined still has foreground/background applied.
    • Only foreground niceness is applied in this situation. (Not a regression.)
  • A custom profile with a niceness defined inline (under process-scheduler/) works.
  • A custom profile with a niceness defined separately (in config.kdl) works.
  • Config reloading works with system76-scheduler daemon reload, systemctl reload com.system76.Scheduler.service, and systemctl restart com.system76.Scheduler.service.
  • PipeWire integration works; when an app starts playing audio, it's assigned the niceness of the pipewire group and retains it until it's closed. It gets regular foreground/background niceness again when it's relaunched (or sooner if the audio stream stops.)
  • After disabling the foreground/background profiles, other profiles still work.

I noticed restarting the daemon (via systemctl restart com.system76.Scheduler.service) is a lot faster now.

@mmstick mmstick merged commit 1ef05f9 into master May 1, 2023
4 of 5 checks passed
@13r0ck 13r0ck deleted the scheduler branch May 1, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support running without tweakable scheduler if cfs profiles are disabled
5 participants