Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp277559ybt; Mon, 6 Jul 2020 09:05:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3ovXFe6gywCgwuj9t0D0CDf89sEZDgPFk73D/O2C59IswEcdJ5CXgX2/Qc3jRAZIqWkx5 X-Received: by 2002:a17:906:da19:: with SMTP id fi25mr43304106ejb.369.1594051545728; Mon, 06 Jul 2020 09:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594051545; cv=none; d=google.com; s=arc-20160816; b=B33DZ9u2Tqzqj5ir0Yi5u0nG684FpHfSsIvFUQR0/yyg8o5TSvrDRLyGkHvgKta7CT U3wEebkU1/Y0A8geOQNzLjMDVQCoWkqbKnb/eSLmjHymPLqPHXs02fIM7DkfZjEAW1C5 nnktAVsldM8kegCCp+FnFgmeYu32+9tDBVIpSXqvKSAsRhGv1DXemWnvqAov0k4B98lp sKxyzHnCBinxQrxCmobNeUgRzNaoZQ03zdWkNybzqyg01RnQPCS4N+U8iHT6SO7Z+HIS 4rf4Oyl9rFAROrM+0ETZ+WcPHQYHqyMQSy3uWfr7reQQqp4/Vnsy8s/aErAUjTHTPmi6 IDRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=1O/Egd50pEVl2FelAZIRD/QJ5lxPCURdcJF1swLorD8=; b=0DQtdVjs1Xr9g2WKnc3HJFJhuMZkvrjWw8QWg7BbPRLk0nN5SqnT0tCZCGsNbzmHNL h6SI1wLUOy0WWSNcu5+RN+b8MFIvNbRsleQ6NKlvxcY+vFiusCudTZAyI9+W3y7Cot0r V8Ca63s6GvTtXOgZ85d82zz+uW/lObPMyu4yczK4zEoyjNY884JsATy/4/yMsiEJN2gU HLushBYgrtWwYX2GxV2Y23Jqir9UfXZgm4LWjuLTMAI7sSO6+S/GXzhctlqzprXBceTf l3jdLIsCLRLkh0Ki3OimXE3iWL1AnGvqDre3B5qmxsbmFR76ZwTTbO2vf8LbG0kB8xX/ 65LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F3N9evgP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qk1si12960622ejb.15.2020.07.06.09.05.22; Mon, 06 Jul 2020 09:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F3N9evgP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729406AbgGFQEs (ORCPT + 99 others); Mon, 6 Jul 2020 12:04:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729293AbgGFQEr (ORCPT ); Mon, 6 Jul 2020 12:04:47 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7351C061755 for ; Mon, 6 Jul 2020 09:04:47 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id 207so16961127pfu.3 for ; Mon, 06 Jul 2020 09:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=1O/Egd50pEVl2FelAZIRD/QJ5lxPCURdcJF1swLorD8=; b=F3N9evgPeqozsKRdL5MuPfNxY8qb2Xk62i0VHUIebj+0bLNz6hGUekawEGAz+wlHda EoIb5jguU4/ZSdr/isnmOF7/W3qoTViInegllx66QIOxUhqWCB0ddu0yXx58ih+zlZB/ 3KGUCd4WYsrCv+7EH0TGjL+LasXm+h6vOLOcKTFLsYgqKi5FPt39phP8A1rAIv6jQzvV lLAu/co6dVnoXAQ1M+jv3PYWTVtNE/nR417fTc2TTT8o7vcLCWe8EBOA1rYbkNq+UFuV z71KMFyi482zUzecnlheEgpE1EML2K8mrK2O/1NMTqFa53/zzs4QAXMGt2gRQ6LE8578 gf1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=1O/Egd50pEVl2FelAZIRD/QJ5lxPCURdcJF1swLorD8=; b=rKBcstcJpdYuvr146qBpyWw7clnkTQCLP+jtXG+VNn8X5RVQ40XFKAQvR5p9BaOBG/ 3tm9U65sifKE2bBhv54U3AU0sLY04EjByzWd6BIGU6ak5AKAJtO2ykt2YBDKKgHWB2qg uQi4ZqOHQKFx64bQUnLWqNAcKkOWQCCelcGG2cp8NPPi4bYpROVF0e4uQeBRlg2/8qL/ JY/jUxwhmYztZVWeD+AJPgSZVYWZmADJS6X8Tya0HpqPU4lyXuqYHetLlCVRMIuJduGo XT4iWc3dnFdHFpYSFJwcmqH4OKcgzlb8pf+AQK99KsFMsnjeNIE8luKF0DYsLKzGDFyu bddw== X-Gm-Message-State: AOAM531UM311LHeo+jLe0RURIKmc8aCJ5kAa3ZitSSIwUILnKTkwXof6 8V4FVF5b6R0/TUgiSjhrZnyCPJSt X-Received: by 2002:a62:29c6:: with SMTP id p189mr27001545pfp.55.1594051486581; Mon, 06 Jul 2020 09:04:46 -0700 (PDT) Received: from iZj6chx1xj0e0buvshuecpZ ([47.75.1.235]) by smtp.gmail.com with ESMTPSA id e12sm19489268pfd.69.2020.07.06.09.04.44 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Jul 2020 09:04:45 -0700 (PDT) Date: Tue, 7 Jul 2020 00:04:42 +0800 From: Peng Liu To: linux-kernel@vger.kernel.org Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de Subject: [PATCH] sched/deadline: dome some cleanup for push_dl_task() Message-ID: <20200706160442.GA19741@iZj6chx1xj0e0buvshuecpZ> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'commit 840d719604b0 ("sched/deadline: Update rq_clock of later_rq when pushing a task")' introduced the update_rq_clock() to fix the "used-before-update" bug. 'commit f4904815f97a ("sched/deadline: Fix double accounting of rq/running bw in push & pull")' took away the bug source(add_running_bw()). We no longer need to update rq_clock in advance, let activate_task() worry about that. Signed-off-by: Peng Liu --- kernel/sched/deadline.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 504d2f51b0d6..c3fa11f84d93 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -2104,13 +2104,7 @@ static int push_dl_task(struct rq *rq) deactivate_task(rq, next_task, 0); set_task_cpu(next_task, later_rq->cpu); - - /* - * Update the later_rq clock here, because the clock is used - * by the cpufreq_update_util() inside __add_running_bw(). - */ - update_rq_clock(later_rq); - activate_task(later_rq, next_task, ENQUEUE_NOCLOCK); + activate_task(later_rq, next_task, 0); ret = 1; resched_curr(later_rq); -- 2.20.1