Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1648347
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE |
| Date | 2017-05-23 21:00 +0200 |
| Message-ID | <tKncd-77q-11@gated-at.bofh.it> (permalink) |
| References | <tKdPz-N6-5@gated-at.bofh.it> <tKdPA-N6-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 23, 2017 at 09:53:46AM +0100, Juri Lelli wrote: > diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h > index e2a6c7b3510b..72723859ef74 100644 > --- a/include/uapi/linux/sched.h > +++ b/include/uapi/linux/sched.h > @@ -48,5 +48,6 @@ > */ > #define SCHED_FLAG_RESET_ON_FORK 0x01 > #define SCHED_FLAG_RECLAIM 0x02 > +#define SCHED_FLAG_SPECIAL 0x04 > > #endif /* _UAPI_LINUX_SCHED_H */ > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 7fc2011c3ce7..ba57e2ef9aef 100644 > @@ -4205,7 +4212,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; > > /* Could we pretty please not expose this gruesome hack to userspace? So if you stick it in attr->sched_flags, use a high bit and don't put it in a uapi header. Also make the flags check explicitly fail on it when @user. Such that only _nocheck() (and thus kernel) callers have access to it. Also, there's not nearly enough warnings and other derisory comments near it.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Juri Lelli <juri.lelli@arm.com> - 2017-05-23 11:00 +0200
Re: [PATCH RFC 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Peter Zijlstra <peterz@infradead.org> - 2017-05-23 21:00 +0200
Re: [PATCH RFC 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Juri Lelli <juri.lelli@arm.com> - 2017-05-24 11:40 +0200
csiph-web