Re: [RFC][PATCH 12/13] sched/deadline: Introduce deadline servers

From: Dietmar Eggemann
Date: Fri Aug 09 2019 - 05:17:24 EST


On 7/26/19 4:54 PM, Peter Zijlstra wrote:

[...]

> +void dl_server_init(struct sched_dl_entity *dl_se, struct rq *rq,
> + dl_server_has_tasks_f has_tasks,
> + dl_server_pick_f pick)
> +{
> + dl_se->dl_server = 1;
> + dl_se->rq = rq;
> + dl_se->server_has_tasks = has_tasks;
> + dl_se->server_pick = pick;
> +
> + setup_new_dl_entity(dl_se);

IMHO, this needs rq locking because of the rq_clock(rq) in
setup_new_dl_entity().

[ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/sched/sched.h:1119
dl_server_init+0x118/0x178
...
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Tainted: G W
5.3.0-rc3-00013-ga33cf033cc99-dirty #10
[ 0.000000] Hardware name: ARM Juno development board (r0) (DT)
...
[ 0.000000] Call trace:
[ 0.000000] dl_server_init+0x118/0x178
[ 0.000000] fair_server_init+0x5c/0x68
[ 0.000000] sched_init+0x2c8/0x474
[ 0.000000] start_kernel+0x290/0x514

[...]