From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753618AbcHJTz3 (ORCPT ); Wed, 10 Aug 2016 15:55:29 -0400 Received: from mga09.intel.com ([134.134.136.24]:17619 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935508AbcHJSgX (ORCPT ); Wed, 10 Aug 2016 14:36:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,498,1464678000"; d="scan'208";a="1011742060" From: Yuyang Du To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org Cc: bsegall@google.com, pjt@google.com, morten.rasmussen@arm.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, matt@codeblueprint.co.uk, umgwanakikbuti@gmail.com, Yuyang Du Subject: [PATCH v1 05/10] sched/fair: Add __always_inline compiler attribute to __accumulate_sum() Date: Wed, 10 Aug 2016 08:14:50 +0800 Message-Id: <1470788095-2125-6-git-send-email-yuyang.du@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1470788095-2125-1-git-send-email-yuyang.du@intel.com> References: <1470788095-2125-1-git-send-email-yuyang.du@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __accumulate_sum()'s caller and sibling functions are all inlined. And it will be called almost every time in its caller. It does not make sense if only it is not inlined. Signed-off-by: Yuyang Du --- 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 06819bb..6b10fb0 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2649,7 +2649,7 @@ static __always_inline u64 __decay_sum(u64 val, u64 n) * We can compute this efficiently by combining: * y^32 = 1/2 with precomputed \Sum 1024*y^n (where n < 32) */ -static u32 __accumulate_sum(u64 n) +static __always_inline u32 __accumulate_sum(u64 n) { u32 contrib = 0; -- 1.7.9.5