Re: [RFC][PATCH 02/11] sched: SCHED_DEADLINE policy implementation.

From: Peter Zijlstra
Date: Tue Apr 13 2010 - 14:23:22 EST


On Sun, 2010-02-28 at 20:17 +0100, Raistlin wrote:
> +++ b/kernel/fork.c
> @@ -937,6 +937,16 @@ SYSCALL_DEFINE1(set_tid_address, int __user *, tidptr)
> return task_pid_vnr(current);
> }
>
> +static void init_task_dl_entity(struct task_struct *p)
> +{
> + RB_CLEAR_NODE(&p->dl.rb_node);
> + hrtimer_init(&p->dl.dl_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> +
> + p->dl.dl_runtime = p->dl.runtime = 0;
> + p->dl.dl_deadline = p->dl.deadline = 0;
> + p->dl.flags = 0;
> +}
> +
> static void rt_mutex_init_task(struct task_struct *p)
> {
> raw_spin_lock_init(&p->pi_lock);
> @@ -1025,6 +1035,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
>
> ftrace_graph_init_task(p);
>
> + init_task_dl_entity(p);
> +
> rt_mutex_init_task(p);
>

Why doesn't that live in/use sched_fork()?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/