From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbdBJJ1V (ORCPT ); Fri, 10 Feb 2017 04:27:21 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:56913 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751683AbdBJJ1S (ORCPT ); Fri, 10 Feb 2017 04:27:18 -0500 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com From: Byungchul Park To: peterz@infradead.org, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, tkhai@yandex.ru Subject: [PATCH] sched/deadline: Remove redundant code replenishing runtime Date: Fri, 10 Feb 2017 18:11:28 +0900 Message-Id: <1486717888-30580-1-git-send-email-byungchul.park@lge.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For a task passing its deadline while !rq, it will be replenished in the following path because dl_se->deadline < rq_lock. enqueue_dl_entity(ENQUEUE_WAKEUP) update_dl_entity Therefore, code replenishing it in the timer callback in the case is unnecessary. This is not for enhancing performance but just for removing a redundant code. Signed-off-by: Byungchul Park --- kernel/sched/deadline.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 27737f3..9c77696 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -624,10 +624,8 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer) * We can be both throttled and !queued. Replenish the counter * but do not enqueue -- wait for our wakeup to do that. */ - if (!task_on_rq_queued(p)) { - replenish_dl_entity(dl_se, dl_se); + if (!task_on_rq_queued(p)) goto unlock; - } #ifdef CONFIG_SMP if (unlikely(!rq->online)) { -- 1.9.1