Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755543AbdCGOAc (ORCPT ); Tue, 7 Mar 2017 09:00:32 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:37106 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755497AbdCGN76 (ORCPT ); Tue, 7 Mar 2017 08:59:58 -0500 Date: Tue, 7 Mar 2017 13:35:29 +0000 From: Matt Fleming To: Wanpeng Li Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Wanpeng Li , Juri Lelli , Thomas Gleixner Subject: Re: [PATCH] sched/deadline: Add missing update_rq_clock() in dl_task_timer() Message-ID: <20170307133529.GB31241@codeblueprint.co.uk> References: <1488865888-15894-1-git-send-email-wanpeng.li@hotmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1488865888-15894-1-git-send-email-wanpeng.li@hotmail.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1245 Lines: 33 On Mon, 06 Mar, at 09:51:28PM, Wanpeng Li wrote: > From: Wanpeng Li > > 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