Re: How to choose a default sched policy

From: Rakib Mullick
Date: Thu Oct 27 2011 - 12:44:29 EST


On Thu, Oct 27, 2011 at 9:09 PM, Sebastiano Spicuglia
<spicuglia.sebastiano@xxxxxxxxx> wrote:
> Hi all,
>
> I implemented, just for accademic purposes, a new sched
> policy. Now I need to substitute it to the fair one, so when the kernel
> runs, normal tasks are scheduled by mine policy.
> How can i perform this switch? Is there in sched.c a single
> point of switch or I have to change every occurance of
> "p->sched_class = &fair_sched_class;" with
> "p->sched_class = &mine_sched_class;"?
>
Yes, you can do it in this way. You'll also need to create a Kconfig
option, from there you can select your scheduling policy.
Alternatively, you can also take a look at Con Kolivas's sched_bfs
implementation.

Thanks,
Rakib
--
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/