pop-os / system76-scheduler

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

Make cfs-profiles configuration clearer #98

Open kriansa opened 1 year ago

kriansa commented 1 year ago

Currently, the CFS tuning happens when the option is enabled and what it does is switching between the two profiles when the power source is either battery or ac. However, there's no place in the config file where that information is stated:

// Latency profiles the kernel's Completely Fair Scheduler
cfs-profiles enable=true {
    // The kernel-default values which are ideal for battery life and servers
    default latency=6 nr-latency=8 wakeup-granularity=1.0 bandwidth-size=5 preempt="voluntary"

    // Zen CFS parameters that make the desktop more responsive
    responsive latency=4 nr-latency=10 wakeup-granularity=0.5 bandwidth-size=3 preempt="full"
}

Ideally, I'd swap the profile names default and responsive to battery and ac respectively, so they reflect better what the scheduler is actually doing. An alternative would be to simply add a comment making that clearer.

Would you be willing to accept patches for either?

liammcdermott commented 5 months ago

Agreed, I'm very confused by this section of the config. I'm also wondering if it's possible to switch the profiles, and how I might see which profile is currently in use.

If my machine is on AC and that makes it choose responsive, I'd love to know that's the case. A comment and README update would be enough.