pop-os / system76-scheduler

Auto-configure CFS and process priorities for improved desktop responsiveness
Mozilla Public License 2.0
545 stars 33 forks source link

Configuring `background: None` no longer leaves niceness unchanged for background processes #38

Closed techsy730 closed 2 years ago

techsy730 commented 2 years ago

When setting in the config.ron

background: None

system76-scheduler now interprets that as a niceness of 0, instead of leaving it unchanged for background processes.

foreground: None

still seems to work as intended (configures it not to change priorities)

techsy730 commented 2 years ago

Seems to have been introduced in 1dfae65f973f8ed455734b8315bd000ca2cf38ea

When looping over background processes, it now performs config.background.unwrap_or(0), instead of matching config.background against a Some (and thus breaking out if it was None)

techsy730 commented 2 years ago

If the concern is about processes that go from foreground -> background keeping their foreground priority, then maybe the configuration can error, or warn, if background is None but foreground isn't.