Re: [BUG] [ tip/sched/core ] System unresponsive after booting

From: Michael wang
Date: Wed Jan 15 2014 - 04:32:50 EST


Hi, Daniel

On 01/15/2014 04:27 PM, Daniel Lezcano wrote:
[snip]
> commit d50dde5a10f305253cbc3855307f608f8a3c5f73
> Author: Dario Faggioli <raistlin@xxxxxxxx>
> Date: Thu Nov 7 14:43:36 2013 +0100
>
> sched: Add new scheduler syscalls to support an extended scheduling
> parameters ABI
>
> Add the syscalls needed for supporting scheduling algorithms
> with extended scheduling parameters (e.g., SCHED_DEADLINE).

Will this do any helps?

Regards,
Michael Wang

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 0326c06..bf4a6ed 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3464,6 +3464,10 @@ int sched_setscheduler(struct task_struct *p, int
policy,
.sched_policy = policy,
.sched_priority = param->sched_priority
};
+
+ if (fair_policy(policy))
+ attr.sched_nice = PRIO_TO_NICE(attr.sched_priority);
+
return __sched_setscheduler(p, &attr, true);
}
EXPORT_SYMBOL_GPL(sched_setscheduler);
@@ -3494,6 +3498,10 @@ int sched_setscheduler_nocheck(struct task_struct
*p, int policy,
.sched_policy = policy,
.sched_priority = param->sched_priority
};
+
+ if (fair_policy(policy))
+ attr.sched_nice = PRIO_TO_NICE(attr.sched_priority);
+
return __sched_setscheduler(p, &attr, false);
}



>
>
> [ ... ]
>
>
> Signed-off-by: Dario Faggioli <raistlin@xxxxxxxx>
> [ Rewrote to use sched_attr. ]
> Signed-off-by: Juri Lelli <juri.lelli@xxxxxxxxx>
> [ Removed sched_setscheduler2() for now. ]
> Signed-off-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Link:
> http://lkml.kernel.org/r/1383831828-15501-3-git-send-email-juri.lelli@xxxxxxxxx
>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
>

--
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/