From: Frederic Weisbecker <fweisbec@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Chris Metcalf <cmetcalf@ezchip.com>,
Peter Zijlstra <peterz@infradead.org>,
Mike Galbraith <umgwanakikbuti@gmail.com>,
Ingo Molnar <mingo@kernel.org>, Dave Jones <davej@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Oleg Nesterov <oleg@redhat.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
Ingo Molnar <mingo@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Rik van Riel <riel@redhat.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [PATCH 3/4] nohz: Add tick_nohz_full_add_cpus_to() API
Date: Tue, 21 Apr 2015 14:23:08 +0200 [thread overview]
Message-ID: <1429618989-11104-4-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1429618989-11104-1-git-send-email-fweisbec@gmail.com>
From: Chris Metcalf <cmetcalf@ezchip.com>
This API is useful to modify a cpumask indicating some special nohz-type
functionality so that the nohz cores are automatically added to that set.
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Link: http://lkml.kernel.org/r/1429024675-18938-1-git-send-email-cmetcalf@ezchip.com
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
include/linux/tick.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/tick.h b/include/linux/tick.h
index f8492da5..4191b56 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -134,6 +134,12 @@ static inline bool tick_nohz_full_cpu(int cpu)
return cpumask_test_cpu(cpu, tick_nohz_full_mask);
}
+static inline void tick_nohz_full_add_cpus_to(struct cpumask *mask)
+{
+ if (tick_nohz_full_enabled())
+ cpumask_or(mask, mask, tick_nohz_full_mask);
+}
+
extern void __tick_nohz_full_check(void);
extern void tick_nohz_full_kick(void);
extern void tick_nohz_full_kick_cpu(int cpu);
@@ -142,6 +148,7 @@ extern void __tick_nohz_task_switch(struct task_struct *tsk);
#else
static inline bool tick_nohz_full_enabled(void) { return false; }
static inline bool tick_nohz_full_cpu(int cpu) { return false; }
+static inline void tick_nohz_full_add_cpus_to(struct cpumask *mask) { }
static inline void __tick_nohz_full_check(void) { }
static inline void tick_nohz_full_kick_cpu(int cpu) { }
static inline void tick_nohz_full_kick(void) { }
--
2.1.4
next prev parent reply other threads:[~2015-04-21 12:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 12:23 [PATCH 0/4] nohz: A few improvements v2 Frederic Weisbecker
2015-04-21 12:23 ` [PATCH 1/4] context_tracking: Protect against recursion Frederic Weisbecker
2015-04-21 12:23 ` [PATCH 2/4] context_tracking: Inherit TIF_NOHZ through forks instead of context switches Frederic Weisbecker
2015-04-21 15:26 ` Peter Zijlstra
2015-04-21 16:51 ` Frederic Weisbecker
2015-04-21 20:52 ` Peter Zijlstra
2015-04-21 21:06 ` Frederic Weisbecker
2015-04-22 15:35 ` Peter Zijlstra
2015-04-22 15:51 ` Frederic Weisbecker
2015-04-21 12:23 ` Frederic Weisbecker [this message]
2015-04-21 12:23 ` [PATCH 4/4] nohz: Set isolcpus when nohz_full is set Frederic Weisbecker
2015-04-21 15:26 ` [PATCH 0/4] nohz: A few improvements v2 Peter Zijlstra
-- strict thread matches above, loose matches on Subject: below --
2015-04-24 15:58 [PATCH 0/4] nohz: A few improvements v3 Frederic Weisbecker
2015-04-24 15:58 ` [PATCH 3/4] nohz: Add tick_nohz_full_add_cpus_to() API Frederic Weisbecker
2015-05-06 16:04 [GIT PULL] nohz: A few improvements v4 Frederic Weisbecker
2015-05-06 16:04 ` [PATCH 3/4] nohz: Add tick_nohz_full_add_cpus_to() API Frederic Weisbecker
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=1429618989-11104-4-git-send-email-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=cmetcalf@ezchip.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=riel@redhat.com \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
--cc=umgwanakikbuti@gmail.com \
/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.