Skip to content

Commit

Permalink
sched: CFS: Tune CFS parameters as per linux-zen
Browse files Browse the repository at this point in the history
 * Values taken from
   zen-kernel/zen-kernel@6b3b0b1

Signed-off-by: EndCredits <endcredits@crepuscular-aosp.icu>
  • Loading branch information
EndCredits committed May 16, 2023
1 parent 94c1116 commit 5d51348
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const_debug unsigned int sysctl_sched_features =
* Number of tasks to iterate in a single balance run.
* Limited because this is done with IRQs disabled.
*/
const_debug unsigned int sysctl_sched_nr_migrate = 32;
const_debug unsigned int sysctl_sched_nr_migrate = 64;

/*
* period over which we measure -rt task CPU usage in us.
Expand Down
12 changes: 6 additions & 6 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ enum sched_tunable_scaling sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_L
*
* (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
unsigned int sysctl_sched_min_granularity = 750000ULL;
static unsigned int normalized_sysctl_sched_min_granularity = 750000ULL;
unsigned int sysctl_sched_min_granularity = 400000ULL;
static unsigned int normalized_sysctl_sched_min_granularity = 400000ULL;

/*
* This value is kept at sysctl_sched_latency/sysctl_sched_min_granularity
*/
static unsigned int sched_nr_latency = 8;
static unsigned int sched_nr_latency = 10;

/*
* After fork, child runs first. If set to 0 (default) then
Expand All @@ -88,8 +88,8 @@ unsigned int sysctl_sched_child_runs_first __read_mostly;
*
* (default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
unsigned int sysctl_sched_wakeup_granularity = 1000000UL;
static unsigned int normalized_sysctl_sched_wakeup_granularity = 1000000UL;
unsigned int sysctl_sched_wakeup_granularity = 500000UL;
static unsigned int normalized_sysctl_sched_wakeup_granularity = 500000UL;

const_debug unsigned int sysctl_sched_migration_cost = 500000UL;
DEFINE_PER_CPU_READ_MOSTLY(int, sched_load_boost);
Expand Down Expand Up @@ -123,7 +123,7 @@ int __weak arch_asym_cpu_priority(int cpu)
*
* (default: 5 msec, units: microseconds)
*/
unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
unsigned int sysctl_sched_cfs_bandwidth_slice = 3000UL;
#endif

/* Migration margins */
Expand Down

0 comments on commit 5d51348

Please sign in to comment.