Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682894
| From | Joel Fernandes <joelaf@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE |
| Date | 2017-07-07 06:00 +0200 |
| Message-ID | <u0sAV-6ES-1@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 |
Hi Juri, On Wed, Jul 5, 2017 at 1:59 AM, Juri Lelli <juri.lelli@arm.com> wrote: > Worker kthread needs to be able to change frequency for all other > threads. > > Make it special, just under STOP class. > > Signed-off-by: Juri Lelli <juri.lelli@arm.com> > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: Ingo Molnar <mingo@kernel.org> > Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > Cc: Viresh Kumar <viresh.kumar@linaro.org> > Cc: Luca Abeni <luca.abeni@santannapisa.it> > Cc: Claudio Scordino <claudio@evidence.eu.com> > --- > Changes from RFCv0: > > - use a high bit of sched_flags and don't expose the new flag to > userspace (also add derisory comments) (Peter) > --- > include/linux/sched.h | 1 + > kernel/sched/core.c | 15 +++++++++++++-- > kernel/sched/cpufreq_schedutil.c | 15 ++++++++++++--- > kernel/sched/deadline.c | 13 +++++++++++++ > kernel/sched/sched.h | 20 +++++++++++++++++++- > 5 files changed, 58 insertions(+), 6 deletions(-) > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 1f0f427e0292..0ba767fdedae 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -1359,6 +1359,7 @@ extern int idle_cpu(int cpu); > extern int sched_setscheduler(struct task_struct *, int, const struct sched_param *); > extern int sched_setscheduler_nocheck(struct task_struct *, int, const struct sched_param *); > extern int sched_setattr(struct task_struct *, const struct sched_attr *); > +extern int sched_setattr_nocheck(struct task_struct *, const struct sched_attr *); > extern struct task_struct *idle_task(int cpu); > > /** > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 5186797908dc..0e40c7ff2bf4 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -3998,7 +3998,9 @@ static int __sched_setscheduler(struct task_struct *p, > } > > if (attr->sched_flags & > - ~(SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM)) > + ~(SCHED_FLAG_RESET_ON_FORK | > + SCHED_FLAG_RECLAIM | > + SCHED_FLAG_SPECIAL)) > return -EINVAL; I was thinking if its better to name SCHED_FLAG_SPECIAL something more descriptive than "special", since it will not be clear looking at other parts of the code that this is used for the frequency scaling thread or that its a DL task. I was thinking since this flag is specifically setup for the sugov thread frequency scaling purpose, a better flag name than SPECIAL might be SCHED_FLAG_DL_FREQ_SCALE or SCHED_FLAG_FREQ_SCALE. But I am Ok with whatever makes sense to do here. Thanks, Regards, -Joel
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