Loading kernel/sched/cpufreq_schedutil.c +3 −16 Original line number Diff line number Diff line Loading @@ -991,20 +991,7 @@ static void sugov_policy_free(struct sugov_policy *sg_policy) static int sugov_kthread_create(struct sugov_policy *sg_policy) { struct task_struct *thread; struct sched_attr attr = { .size = sizeof(struct sched_attr), .sched_policy = SCHED_DEADLINE, .sched_flags = SCHED_FLAG_SUGOV, .sched_nice = 0, .sched_priority = 0, /* * Fake (unused) bandwidth; workaround to "fix" * priority inheritance. */ .sched_runtime = 1000000, .sched_deadline = 10000000, .sched_period = 10000000, }; struct sched_param param = { .sched_priority = MAX_USER_RT_PRIO / 2 }; struct cpufreq_policy *policy = sg_policy->policy; int ret; Loading @@ -1022,10 +1009,10 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy) return PTR_ERR(thread); } ret = sched_setattr_nocheck(thread, &attr); ret = sched_setscheduler_nocheck(thread, SCHED_FIFO, ¶m); if (ret) { kthread_stop(thread); pr_warn("%s: failed to set SCHED_DEADLINE\n", __func__); pr_warn("%s: failed to set SCHED_FIFO\n", __func__); return ret; } Loading Loading
kernel/sched/cpufreq_schedutil.c +3 −16 Original line number Diff line number Diff line Loading @@ -991,20 +991,7 @@ static void sugov_policy_free(struct sugov_policy *sg_policy) static int sugov_kthread_create(struct sugov_policy *sg_policy) { struct task_struct *thread; struct sched_attr attr = { .size = sizeof(struct sched_attr), .sched_policy = SCHED_DEADLINE, .sched_flags = SCHED_FLAG_SUGOV, .sched_nice = 0, .sched_priority = 0, /* * Fake (unused) bandwidth; workaround to "fix" * priority inheritance. */ .sched_runtime = 1000000, .sched_deadline = 10000000, .sched_period = 10000000, }; struct sched_param param = { .sched_priority = MAX_USER_RT_PRIO / 2 }; struct cpufreq_policy *policy = sg_policy->policy; int ret; Loading @@ -1022,10 +1009,10 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy) return PTR_ERR(thread); } ret = sched_setattr_nocheck(thread, &attr); ret = sched_setscheduler_nocheck(thread, SCHED_FIFO, ¶m); if (ret) { kthread_stop(thread); pr_warn("%s: failed to set SCHED_DEADLINE\n", __func__); pr_warn("%s: failed to set SCHED_FIFO\n", __func__); return ret; } Loading