Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751302AbdCOCOk (ORCPT ); Tue, 14 Mar 2017 22:14:40 -0400 Received: from mga14.intel.com ([192.55.52.115]:51954 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222AbdCOCOi (ORCPT ); Tue, 14 Mar 2017 22:14:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,166,1486454400"; d="scan'208";a="1108544249" From: Andi Kleen To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, Andi Kleen , peterz@infradead.org Subject: [PATCH 3/7] sched: Out of line __update_load_avg Date: Tue, 14 Mar 2017 19:14:27 -0700 Message-Id: <20170315021431.13107-4-andi@firstfloor.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170315021431.13107-1-andi@firstfloor.org> References: <20170315021431.13107-1-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 33 From: Andi Kleen This is a very complex function, which is called in multiple places. It is unlikely that inlining or not inlining it makes any difference for its run time. This saves around 13k text in my kernel text data bss dec hex filename 9083992 5367600 11116544 25568136 1862388 vmlinux-before-load-avg 9070166 5367600 11116544 25554310 185ed86 vmlinux-load-avg Cc: peterz@infradead.org Signed-off-by: Andi Kleen --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index dea138964b91..78ace89cd481 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2848,7 +2848,7 @@ static u32 __compute_runnable_contrib(u64 n) * load_avg = u_0` + y*(u_0 + u_1*y + u_2*y^2 + ... ) * = u_0 + u_1*y + u_2*y^2 + ... [re-labeling u_i --> u_{i+1}] */ -static __always_inline int +static int __update_load_avg(u64 now, int cpu, struct sched_avg *sa, unsigned long weight, int running, struct cfs_rq *cfs_rq) { -- 2.9.3