sched/new-API-sched_setscheduler
Linus,
Please pull the sched/new-API-sched_setscheduler git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git sched/new-API-sched_setscheduler
this is a single commit that adds a new scheduler API. (which was kept in a separate topic branch to make it pullable by other maintainers in the development window without them having to pick up other scheduler changes)
Thanks,
Ingo
------------------>
Rusty Russell (1):
sched: add new API sched_setscheduler_nocheck: add a flag to control access checks
include/linux/sched.h | 2 ++ kernel/sched.c | 48 ++++++++++++++++++++++++++++++++++++------------ kernel/softirq.c | 2 +- kernel/stop_machine.c | 2 +- 4 files changed, 40 insertions(+), 14 deletions(-)
include/linux/sched.h +2 -0
@@ -1655,6 +1655,8 @@ extern int can_nice(const struct task_struct *p, const int nice);extern int task_curr (const struct task_struct *p);extern int idle_cpu (int cpu);extern int sched_setscheduler (struct task_struct *,int ,struct sched_param *); +extern int sched_setscheduler_nocheck (struct task_struct *,int , +struct sched_param *);extern struct task_struct *idle_task (int cpu);extern struct task_struct *curr_task (int cpu);extern void set_curr_task (int cpu,struct task_struct *p);
kernel/sched.c +36 -12
74 lines not on this page · raw message
kernel/softirq.c +1 -1
@@ -645,7 +645,7 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb, p =per_cpu (ksoftirqd, hotcpu);per_cpu (ksoftirqd, hotcpu) =NULL ; -sched_setscheduler (p,SCHED_FIFO , ¶m); +sched_setscheduler_nocheck (p,SCHED_FIFO , ¶m);kthread_stop (p);takeover_tasklets (hotcpu);break ;
kernel/stop_machine.c +1 -1
@@ -187,7 +187,7 @@ struct task_struct *__stop_machine_run(int (*fn)(void *), void *data,struct sched_param param = { .sched_priority =MAX_RT_PRIO -1 };/* One high-prio thread per cpu. We'll do this one. */ -sched_setscheduler (p,SCHED_FIFO , ¶m); +sched_setscheduler_nocheck (p,SCHED_FIFO , ¶m);kthread_bind (p, cpu);wake_up_process (p);wait_for_completion (&smdata.done);