From patchwork Mon Jan 11 16:40:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 8006691 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9D4DB9F1C0 for ; Mon, 11 Jan 2016 16:40:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0B4420295 for ; Mon, 11 Jan 2016 16:40:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAB6D2024C for ; Mon, 11 Jan 2016 16:40:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761174AbcAKQki (ORCPT ); Mon, 11 Jan 2016 11:40:38 -0500 Received: from mx2.suse.de ([195.135.220.15]:49897 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761187AbcAKQkh (ORCPT ); Mon, 11 Jan 2016 11:40:37 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1F197AD69; Mon, 11 Jan 2016 16:40:35 +0000 (UTC) Date: Mon, 11 Jan 2016 17:40:31 +0100 From: Jean Delvare To: linux-pm@vger.kernel.org Cc: Thomas Gleixner , Zhang Rui , "Rafael J. Wysocki" , Daniel Lezcano Subject: [PATCH 1/3] Subject: nohz: Expose tick_nohz_enabled Message-ID: <20160111174031.6cc73575@endymion.delvare> In-Reply-To: <20160111173915.63ec1bcd@endymion.delvare> References: <20160111173915.63ec1bcd@endymion.delvare> Organization: SUSE Linux X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The cpuidle subsystem needs it. Signed-off-by: Jean Delvare Cc: Thomas Gleixner Cc: Zhang Rui Reviewed-by: Thomas Gleixner --- include/linux/tick.h | 2 ++ kernel/time/tick-sched.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) --- linux-4.4.orig/include/linux/tick.h 2016-01-11 00:01:32.000000000 +0100 +++ linux-4.4/include/linux/tick.h 2016-01-11 15:10:46.334547548 +0100 @@ -98,6 +98,7 @@ static inline void tick_broadcast_exit(v } #ifdef CONFIG_NO_HZ_COMMON +extern int tick_nohz_enabled; extern int tick_nohz_tick_stopped(void); extern void tick_nohz_idle_enter(void); extern void tick_nohz_idle_exit(void); @@ -106,6 +107,7 @@ extern ktime_t tick_nohz_get_sleep_lengt extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); #else /* !CONFIG_NO_HZ_COMMON */ +#define tick_nohz_enabled (0) static inline int tick_nohz_tick_stopped(void) { return 0; } static inline void tick_nohz_idle_enter(void) { } static inline void tick_nohz_idle_exit(void) { } --- linux-4.4.orig/kernel/time/tick-sched.c 2016-01-11 15:06:54.776653477 +0100 +++ linux-4.4/kernel/time/tick-sched.c 2016-01-11 15:09:19.022700899 +0100 @@ -387,7 +387,7 @@ void __init tick_nohz_init(void) /* * NO HZ enabled ? */ -static int tick_nohz_enabled __read_mostly = 1; +int tick_nohz_enabled __read_mostly = 1; unsigned long tick_nohz_active __read_mostly; /* * Enable / Disable tickless mode