Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753800AbbFXO7a (ORCPT ); Wed, 24 Jun 2015 10:59:30 -0400 Received: from shelob.surriel.com ([74.92.59.67]:32818 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753308AbbFXO6L (ORCPT ); Wed, 24 Jun 2015 10:58:11 -0400 From: riel@redhat.com To: linux-kernel@vger.kernel.org Cc: fweisbec@redhat.com, peterz@infradead.org, mingo@kernel.org, tglx@linutronix.de, luto@amacapital.net Subject: [RFC PATCH 09/11] nohz,time: add tick_accounting_remote macro Date: Wed, 24 Jun 2015 10:57:58 -0400 Message-Id: <1435157880-22925-10-git-send-email-riel@redhat.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1435157880-22925-1-git-send-email-riel@redhat.com> References: <1435157880-22925-1-git-send-email-riel@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1696 Lines: 50 From: Rik van Riel With the introduction of remote tick based sampling, we now have three ways of gathering time statistics: - local tick based sampling - vtime accounting (used natively on some architectures) - remote tick based sampling On a system with remote tick based sampling, the housekeeping CPUs will still do local tick based sampling. This results in needing two macros for switching the timekeeping code. Signed-off-by: Rik van Riel --- include/linux/vtime.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/vtime.h b/include/linux/vtime.h index 4f5c1a3712e7..a587058c7967 100644 --- a/include/linux/vtime.h +++ b/include/linux/vtime.h @@ -17,6 +17,7 @@ struct task_struct; */ #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE static inline bool tick_accounting_disabled(void) { return true; } +static inline bool tick_accounting_remote(void) { return false; } #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN @@ -29,10 +30,12 @@ static inline bool tick_accounting_disabled(void) return false; } +static inline bool tick_accounting_remote(void) { return true; } #endif /* CONFIG_VIRT_CPU_ACCOUNTING_GEN */ #ifndef CONFIG_VIRT_CPU_ACCOUNTING static inline bool tick_accounting_disabled(void) { return false; } +static inline bool tick_accounting_remote(void) { return false; } #endif /* !CONFIG_VIRT_CPU_ACCOUNTING */ -- 2.1.0 -- 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/