Loading kernel/sched/hmp.c +4 −22 Original line number Diff line number Diff line Loading @@ -1502,29 +1502,11 @@ int sched_hmp_proc_update_handler(struct ctl_table *table, int write, if (write && (old_val == *data)) goto done; /* * Special handling for sched_freq_aggregate_threshold_pct * which can be greater than 100. Use 1000 as an upper bound * value which works for all practical use cases. */ if (data == &sysctl_sched_freq_aggregate_threshold_pct) { if (*data > 1000) { if (sysctl_sched_downmigrate_pct > sysctl_sched_upmigrate_pct) { *data = old_val; ret = -EINVAL; goto done; } } else if (data != &sysctl_sched_select_prev_cpu_us) { /* * all tunables other than sched_select_prev_cpu_us are * in percentage. */ if (sysctl_sched_downmigrate_pct > sysctl_sched_upmigrate_pct || *data > 100) { *data = old_val; ret = -EINVAL; goto done; } } /* * Big task tunable change will need to re-classify tasks on Loading kernel/sysctl.c +23 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,9 @@ static int one_hundred = 100; #ifdef CONFIG_PRINTK static int ten_thousand = 10000; #endif #ifdef CONFIG_SCHED_HMP static int one_thousand = 1000; #endif /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; Loading Loading @@ -336,6 +339,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_spill_nr_run", Loading @@ -351,6 +356,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_downmigrate", Loading @@ -358,6 +365,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_init_task_load", Loading @@ -365,6 +374,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_select_prev_cpu_us", Loading @@ -372,6 +383,7 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, }, { .procname = "sched_enable_colocation", Loading @@ -397,6 +409,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_big_waker_task_load", Loading @@ -404,6 +418,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_enable_thread_grouping", Loading Loading @@ -440,6 +456,13 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, /* * Special handling for sched_freq_aggregate_threshold_pct * which can be greater than 100. Use 1000 as an upper bound * value which works for all practical use cases. */ .extra2 = &one_thousand, }, { .procname = "sched_boost", Loading Loading
kernel/sched/hmp.c +4 −22 Original line number Diff line number Diff line Loading @@ -1502,29 +1502,11 @@ int sched_hmp_proc_update_handler(struct ctl_table *table, int write, if (write && (old_val == *data)) goto done; /* * Special handling for sched_freq_aggregate_threshold_pct * which can be greater than 100. Use 1000 as an upper bound * value which works for all practical use cases. */ if (data == &sysctl_sched_freq_aggregate_threshold_pct) { if (*data > 1000) { if (sysctl_sched_downmigrate_pct > sysctl_sched_upmigrate_pct) { *data = old_val; ret = -EINVAL; goto done; } } else if (data != &sysctl_sched_select_prev_cpu_us) { /* * all tunables other than sched_select_prev_cpu_us are * in percentage. */ if (sysctl_sched_downmigrate_pct > sysctl_sched_upmigrate_pct || *data > 100) { *data = old_val; ret = -EINVAL; goto done; } } /* * Big task tunable change will need to re-classify tasks on Loading
kernel/sysctl.c +23 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,9 @@ static int one_hundred = 100; #ifdef CONFIG_PRINTK static int ten_thousand = 10000; #endif #ifdef CONFIG_SCHED_HMP static int one_thousand = 1000; #endif /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; Loading Loading @@ -336,6 +339,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_spill_nr_run", Loading @@ -351,6 +356,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_downmigrate", Loading @@ -358,6 +365,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_init_task_load", Loading @@ -365,6 +374,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_select_prev_cpu_us", Loading @@ -372,6 +383,7 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, }, { .procname = "sched_enable_colocation", Loading @@ -397,6 +409,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_big_waker_task_load", Loading @@ -404,6 +418,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, .extra2 = &one_hundred, }, { .procname = "sched_enable_thread_grouping", Loading Loading @@ -440,6 +456,13 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_hmp_proc_update_handler, .extra1 = &zero, /* * Special handling for sched_freq_aggregate_threshold_pct * which can be greater than 100. Use 1000 as an upper bound * value which works for all practical use cases. */ .extra2 = &one_thousand, }, { .procname = "sched_boost", Loading