From patchwork Wed May 24 05:29:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 100415 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp115680qge; Tue, 23 May 2017 22:31:54 -0700 (PDT) X-Received: by 10.98.153.153 with SMTP id t25mr36574429pfk.160.1495603914540; Tue, 23 May 2017 22:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495603914; cv=none; d=google.com; s=arc-20160816; b=cnQ78yrU6FaZmy64mcCjjcXVoWRGPxsArLzY/UZPRaVbBozYVDzV1AadGz6x7D1XvV aC2PRdO65WfY/h01C0g/gGNy3KHfyOQ5yUB79zOnJie3hXKb6azxH9wTJ2n+1f2+1/5f f42h2ZlY08rREhJIxtSzc8Avie8mbiKyrxWpQieugh4e6r6V6Vub1cHF9dICTkmIjgbe LcO3Cl/9ysFK566TkZdl/nD47o+3FJl0cTVcznUocUAjgwdYoRumCDXDamAVpRT30tLN gJDciyPGD+Lw4ts2hB3Ag1N+pLoQfQtZmc9YzRleAg67SWm55hJcBdk9K2y1qHoAm6Bd sTeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=iq1b03fDVvJe1IzucGoOqCE1UZWcVbrUgCjlnuuWnQg=; b=F+ZnD2GgqyENLZ/bbO1GXa9sKguiV21Qc0oRxdICPfodVIuChWXeI9y6KGThPPkZeq jWafkaenKnSmcMet2oh7iF/KuPX7z/S+3kujAaMJcNOoBZ7D+rpyOhFrrYAykN2RhPXC LHKIINLGGq56CWFsZKWSihFhkrDJPnNdnL7fbKH2/BZGaYzuHRgl3uW2diaTly36G5uV oASAsLwaifnCzmPc7AyGVDD2RtAAI/aQoxLqXDtBSF6ejwm8twc0e6iydfSUFTenNQWI A6Lk0WtN2UUa3e+o+ShpIsBB8JlX2XeUW5V2Faz5vlpvKPEWiQlRwx4hNNWuMNoGEUw7 WRng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si23856640pli.166.2017.05.23.22.31.54; Tue, 23 May 2017 22:31:54 -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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969247AbdEXFbq (ORCPT + 25 others); Wed, 24 May 2017 01:31:46 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34172 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966203AbdEXFah (ORCPT ); Wed, 24 May 2017 01:30:37 -0400 Received: by mail-pf0-f178.google.com with SMTP id 9so133524840pfj.1 for ; Tue, 23 May 2017 22:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=iq1b03fDVvJe1IzucGoOqCE1UZWcVbrUgCjlnuuWnQg=; b=D/Vt5h1BhG99FnbJn3d1noC5Oja401/prc7G1W4oJWYIpil9GjlLGB6gKVjXRcZiJd VdgOLjXRfnOTlmvtxT9PAFHnN88wRCeouW0fuzoapEa2X6J7bxZk0CT9kxsPScSFZyY1 NsjlxJmpZ/Jt/yuQgInj89l47VlxqOgpl/gxc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=iq1b03fDVvJe1IzucGoOqCE1UZWcVbrUgCjlnuuWnQg=; b=QBmLq/Yuc+WLgfkgZ1TLa69JRgeXiyqp/8oDi44wyYGK2LhyvAya8ZdjTqL+eeK0St 079cJqJEKdlL9YgvA4R6dqCgjaYQZPtZ+vrEAvWU0lO/hbdJB+45X2IMT+QytRWFksdU 2WsRon0tvNQ9ZHPOyXIiQQIhrs+WLK/uPIVcZPYj5FYTa09nefw9LT349j/sEaWTSVNS gzGqnUOLrooHB7Dkq1nDG4GPXG9EafcQJjRA8I70CZPSUpzO3TFkIdqsEh1iUmVFIifx BvblBzjBaY6BRlZ09p3Q9YDW5bwO5b+5exlWtk2z6Os0NCKCtK1r5DSdUTIcR+ThDC16 NDPw== X-Gm-Message-State: AODbwcCg+3LxPH41jMXvKcYAMp3yLJOG2axW/7YuO03bYZhTL1jsGh7Z r24fTLiG3jwaYAnQ X-Received: by 10.99.163.25 with SMTP id s25mr6682748pge.191.1495603836055; Tue, 23 May 2017 22:30:36 -0700 (PDT) Received: from localhost ([122.167.143.58]) by smtp.gmail.com with ESMTPSA id 184sm5946262pgd.12.2017.05.23.22.30.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2017 22:30:35 -0700 (PDT) From: Viresh Kumar To: Ingo Molnar , Peter Zijlstra Cc: Viresh Kumar , linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Vincent Guittot Subject: [PATCH 5/6] sched: fair: Drop always true parameter of update_cfs_rq_load_avg() Date: Wed, 24 May 2017 10:59:56 +0530 Message-Id: <2d28d295f3f591ede7e931462bce1bda5aaa4896.1495603536.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.13.0.70.g6367777092d9 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org update_freq is always true and there is no need to pass it to update_cfs_rq_load_avg(). Remove it. Signed-off-by: Viresh Kumar --- kernel/sched/fair.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) -- 2.13.0.70.g6367777092d9 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e519f6c03fe9..89d61d09d083 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -806,7 +806,7 @@ void post_init_entity_util_avg(struct sched_entity *se) /* * For !fair tasks do: * - update_cfs_rq_load_avg(now, cfs_rq, false); + update_cfs_rq_load_avg(now, cfs_rq); attach_entity_load_avg(cfs_rq, se); switched_from_fair(rq, p); * @@ -3259,7 +3259,6 @@ static inline void set_tg_cfs_propagate(struct cfs_rq *cfs_rq) {} * update_cfs_rq_load_avg - update the cfs_rq's load/util averages * @now: current time, as per cfs_rq_clock_task() * @cfs_rq: cfs_rq to update - * @update_freq: should we call cfs_rq_util_change() or will the call do so * * The cfs_rq avg is the direct sum of all its entities (blocked and runnable) * avg. The immediate corollary is that all (fair) tasks must be attached, see @@ -3273,7 +3272,7 @@ static inline void set_tg_cfs_propagate(struct cfs_rq *cfs_rq) {} * call update_tg_load_avg() when this function returns true. */ static inline int -update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq, bool update_freq) +update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq) { struct sched_avg *sa = &cfs_rq->avg; int decayed, removed_load = 0, removed_util = 0; @@ -3301,7 +3300,7 @@ update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq, bool update_freq) cfs_rq->load_last_update_time_copy = sa->last_update_time; #endif - if (update_freq && (decayed || removed_util)) + if (decayed || removed_util) cfs_rq_util_change(cfs_rq); return decayed || removed_load; @@ -3329,7 +3328,7 @@ static inline void update_load_avg(struct sched_entity *se, int flags) if (se->avg.last_update_time && !(flags & SKIP_AGE_LOAD)) __update_load_avg_se(now, cpu, cfs_rq, se); - decayed = update_cfs_rq_load_avg(now, cfs_rq, true); + decayed = update_cfs_rq_load_avg(now, cfs_rq); decayed |= propagate_entity_load_avg(se); if (decayed && (flags & UPDATE_TG)) @@ -3473,7 +3472,7 @@ static int idle_balance(struct rq *this_rq, struct rq_flags *rf); #else /* CONFIG_SMP */ static inline int -update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq, bool update_freq) +update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq) { return 0; } @@ -6995,7 +6994,7 @@ static void update_blocked_averages(int cpu) if (throttled_hierarchy(cfs_rq)) continue; - if (update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq, true)) + if (update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq)) update_tg_load_avg(cfs_rq, 0); /* Propagate pending load changes to the parent, if any: */ @@ -7068,7 +7067,7 @@ static inline void update_blocked_averages(int cpu) rq_lock_irqsave(rq, &rf); update_rq_clock(rq); - update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq, true); + update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq); rq_unlock_irqrestore(rq, &rf); }