Received: by 10.192.165.156 with SMTP id m28csp1882684imm; Thu, 12 Apr 2018 05:16:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/tCc2bfx2GpFMaSZ2SrorfDDJTPYhfQ/z86Wxl7aFzsGqlA9gYwW80Q/hnf/Qf8btuk169 X-Received: by 10.98.244.6 with SMTP id r6mr7417970pff.242.1523535416721; Thu, 12 Apr 2018 05:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523535416; cv=none; d=google.com; s=arc-20160816; b=atCJKk6tG3jiLGqf/+FxPpAz0Y8ffqpoeqt0rHQZzboQhtUzAoMsNUDXDt9tQ6F3/4 9IzzcGoJwG6StchkmerKKKEIgbFN2VTUQzyVnddoU6w1TLPIHT9VwmDHTjWAXo4eUV/U hUdmqizeDd1TOayXm7S2kfamdoLeHgCe+x5okztUF8kG3AMGt2r4I+/04IH5dpuc4VAr Dl5wIhJj1U0JjoQeKJzh293UcsjMYs00ZqgjXz5g5Gq1ijpYWLNWkGRi5aias/qKKJBt 0r8CXkhlmEYR767YkXKpbBe09H/CSpwSX0RKhNgt3QP4KBNTIG6X3OoeuBx+cPDXrCn+ Y5ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=jNV2zhuzgcMelKm9LaIT2VJbKkTMx905qrvi3KhxYFk=; b=dYTHgLdc5bojnDmcU5YDzCeFL/I78A6sUp+zvzgVlNmA999Da7MPTRnk20VXslusjs gZId3OfqThLCwM6BNwEnvPFSj6USfDPdcVaX1CQes5mPlmiXY+4nhkyI92/pUgI90Lc2 aBztvX12qnoiw2Ol3nbbY4BzPKwbiFIAGira3aESpU+JruIGDbT0Ucm+q9AjlYpkSZIY 4pBbFXnCrC3Vk0uUh4ERMpUVr2qMGpQIjYZ/NhHzo7Q4d1cNLmuFH+wmigMAqPsgWexS VsAQ7W8RTYJIjyQq7X6ad1i9A5HUyU3Cz5DvPkkzPf9CwtAJ4olgseg3SQeqKeM6avcW 0ksg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z63si2175022pgb.28.2018.04.12.05.16.19; Thu, 12 Apr 2018 05:16:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752386AbeDLMMk (ORCPT + 99 others); Thu, 12 Apr 2018 08:12:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:59270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751863AbeDLMMj (ORCPT ); Thu, 12 Apr 2018 08:12:39 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C769921785; Thu, 12 Apr 2018 12:12:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C769921785 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Thu, 12 Apr 2018 08:12:37 -0400 From: Steven Rostedt To: Li Bin Cc: , , , Subject: Re: [PATCH 2/2] sched/deadline.c: pick and check task if double_lock_balance() unlock the rq Message-ID: <20180412081237.2a212c95@gandalf.local.home> In-Reply-To: <1523530735-20011-3-git-send-email-huawei.libin@huawei.com> References: <1523530735-20011-1-git-send-email-huawei.libin@huawei.com> <1523530735-20011-3-git-send-email-huawei.libin@huawei.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Apr 2018 18:58:55 +0800 Li Bin wrote: > @@ -1965,11 +1985,9 @@ static struct rq *find_lock_later_rq(struct task_struct *task, struct rq *rq) > > /* Retry if something changed. */ > if (double_lock_balance(rq, later_rq)) { > - if (unlikely(task_rq(task) != rq || > - !cpumask_test_cpu(later_rq->cpu, &task->cpus_allowed) || > - task_running(rq, task) || > - !dl_task(task) || > - !task_on_rq_queued(task))) { > + struct task_struct *next_task = pick_next_pushable_dl_task(rq); I would do the same thing here, and add the comment from rt.c as it is the same reason. -- Steve > + if (unlikely(next_task != task || > + !cpumask_test_cpu(later_rq->cpu, &task->cpus_allowed))) { > double_unlock_balance(rq, later_rq); > later_rq = NULL;