Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031572Ab3HIXFO (ORCPT ); Fri, 9 Aug 2013 19:05:14 -0400 Received: from mga11.intel.com ([192.55.52.93]:62512 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031548Ab3HIXE3 (ORCPT ); Fri, 9 Aug 2013 19:04:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,849,1367996400"; d="scan'208";a="384045637" From: Andi Kleen To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, Andi Kleen Subject: [PATCH 05/13] sched: mark should_resched() __always_inline Date: Fri, 9 Aug 2013 16:04:12 -0700 Message-Id: <1376089460-5459-6-git-send-email-andi@firstfloor.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1376089460-5459-1-git-send-email-andi@firstfloor.org> References: <1376089460-5459-1-git-send-email-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 921 Lines: 31 From: Andi Kleen At least gcc 4.6 and some earlier ones does not inline this function. Since it's small and on relatively hot paths force inline it. Signed-off-by: Andi Kleen --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 74d7c04..23df96a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3767,7 +3767,7 @@ SYSCALL_DEFINE0(sched_yield) return 0; } -static inline int should_resched(void) +static __always_inline int should_resched(void) { return need_resched() && !(preempt_count() & PREEMPT_ACTIVE); } -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/