All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: linux-pm@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: [PATCH 1/3] Subject: nohz: Expose tick_nohz_enabled
Date: Mon, 11 Jan 2016 17:40:31 +0100	[thread overview]
Message-ID: <20160111174031.6cc73575@endymion.delvare> (raw)
In-Reply-To: <20160111173915.63ec1bcd@endymion.delvare>

The cpuidle subsystem needs it.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Zhang Rui <rui.zhang@intel.com>
---
 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

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2016-01-11 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 16:39 [PATCH 0/3] Use the ladder cpuidle governor when appropriate Jean Delvare
2016-01-11 16:40 ` Jean Delvare [this message]
2016-01-11 16:44   ` [PATCH 1/3] Subject: nohz: Expose tick_nohz_enabled Jean Delvare
2016-01-11 17:10   ` Thomas Gleixner
2016-01-11 16:41 ` [PATCH 2/3] cpuidle: Default to ladder governor on ticking systems Jean Delvare
2016-01-11 16:43 ` [PATCH 3/3] cpuidle: Don't enable all governors by default Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160111174031.6cc73575@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.