Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1594260

Re: [PATCH] sched/deadline: Add missing update_rq_clock() in dl_task_timer()

From Matt Fleming <matt@codeblueprint.co.uk>
Newsgroups linux.kernel
Subject Re: [PATCH] sched/deadline: Add missing update_rq_clock() in dl_task_timer()
Date 2017-03-07 15:10 +0100
Message-ID <tinYm-6Q-31@gated-at.bofh.it> (permalink)
References <tigtP-3ay-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 06 Mar, at 09:51:28PM, Wanpeng Li wrote:
> From: Wanpeng Li <wanpeng.li@hotmail.com>
> 
> The following warning can be triggered by hot-unplugging the CPU
> on which an active SCHED_DEADLINE task is running on:
> 
>  ------------[ cut here ]------------
>  WARNING: CPU: 7 PID: 0 at kernel/sched/sched.h:833 replenish_dl_entity+0x71e/0xc40
>  rq->clock_update_flags < RQCF_ACT_SKIP
>  CPU: 7 PID: 0 Comm: swapper/7 Tainted: G    B           4.11.0-rc1+ #24
 
[...]

> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 99b2c33..c6db3fd 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -638,6 +638,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
>  		lockdep_unpin_lock(&rq->lock, rf.cookie);
>  		rq = dl_task_offline_migration(rq, p);
>  		rf.cookie = lockdep_pin_lock(&rq->lock);
> +		update_rq_clock(rq);
>  
>  		/*
>  		 * Now that the task has been migrated to the new RQ and we

Yeah, I guess the reason we can't use the rq_repin_lock() function is
because of all the DL double rq locking going on inside of
dl_task_offline_migration().

I'd definitely like someone else to verify, but this looks OK to me.

Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] sched/deadline: Add missing update_rq_clock() in dl_task_timer() Wanpeng Li <kernellwp@gmail.com> - 2017-03-07 07:10 +0100
  Re: [PATCH] sched/deadline: Add missing update_rq_clock() in  dl_task_timer() Matt Fleming <matt@codeblueprint.co.uk> - 2017-03-07 15:10 +0100

csiph-web