Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682990
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE |
| Date | 2017-07-07 09:30 +0200 |
| Message-ID | <u0vSa-Am-27@gated-at.bofh.it> (permalink) |
| References | <tZOtQ-4hV-5@gated-at.bofh.it> <tZOtQ-4hV-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 05-07-17, 09:59, Juri Lelli wrote:
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index f2494d1fc8ef..ba6227625f24 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -424,7 +424,16 @@ 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_param param = { .sched_priority = MAX_USER_RT_PRIO / 2 };
> + struct sched_attr attr = {
> + .size = sizeof(struct sched_attr),
> + .sched_policy = SCHED_DEADLINE,
> + .sched_flags = SCHED_FLAG_SPECIAL,
> + .sched_nice = 0,
> + .sched_priority = 0,
> + .sched_runtime = 0,
> + .sched_deadline = 0,
> + .sched_period = 0,
> + };
> struct cpufreq_policy *policy = sg_policy->policy;
> int ret;
>
> @@ -442,10 +451,10 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy)
> return PTR_ERR(thread);
> }
>
> - ret = sched_setscheduler_nocheck(thread, SCHED_FIFO, ¶m);
> + ret = sched_setattr_nocheck(thread, &attr);
> if (ret) {
> kthread_stop(thread);
> - pr_warn("%s: failed to set SCHED_FIFO\n", __func__);
> + pr_warn("%s: failed to set SCHED_DEADLINE\n", __func__);
> return ret;
> }
Acked-by: Viresh Kumar <viresh.kumar@linaro.org> (schedutil)
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Juri Lelli <juri.lelli@arm.com> - 2017-07-05 11:10 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Joel Fernandes <joelaf@google.com> - 2017-07-07 06:00 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Thomas Gleixner <tglx@linutronix.de> - 2017-07-07 12:50 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Juri Lelli <juri.lelli@arm.com> - 2017-07-07 13:00 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-07 15:20 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Steven Rostedt <rostedt@goodmis.org> - 2017-07-08 00:00 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Joel Fernandes <joelaf@google.com> - 2017-07-08 00:10 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Steven Rostedt <rostedt@goodmis.org> - 2017-07-08 00:20 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Joel Fernandes <joelaf@google.com> - 2017-07-08 01:00 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Juri Lelli <juri.lelli@arm.com> - 2017-07-07 12:50 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Peter Zijlstra <peterz@infradead.org> - 2017-07-11 14:40 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-07 09:30 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Peter Zijlstra <peterz@infradead.org> - 2017-07-11 18:20 +0200
Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Juri Lelli <juri.lelli@arm.com> - 2017-07-11 19:10 +0200
csiph-web