Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440579 > unrolled thread

[patch 26/66] perf: Remove perf cpu notifier code

Started byAnna-Maria Gleixner <anna-maria@linutronix.de>
First post2016-07-11 14:50 +0200
Last post2016-07-11 16:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [patch 26/66] perf: Remove perf cpu notifier code Anna-Maria Gleixner <anna-maria@linutronix.de> - 2016-07-11 14:50 +0200
    Re: [patch 26/66] perf: Remove perf cpu notifier code Ingo Molnar <mingo@kernel.org> - 2016-07-11 16:40 +0200
      Re: [patch 26/66] perf: Remove perf cpu notifier code Anna-Maria Gleixner <anna-maria@linutronix.de> - 2016-07-11 16:50 +0200

#1440579 — [patch 26/66] perf: Remove perf cpu notifier code

FromAnna-Maria Gleixner <anna-maria@linutronix.de>
Date2016-07-11 14:50 +0200
Subject[patch 26/66] perf: Remove perf cpu notifier code
Message-ID<rTIOS-762-21@gated-at.bofh.it>
All users converted to state machine callbacks.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
---
 include/linux/cpu.h        |    2 --
 include/linux/perf_event.h |   35 -----------------------------------
 2 files changed, 37 deletions(-)

--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -59,8 +59,6 @@ struct notifier_block;
  * CPU notifier priorities.
  */
 enum {
-	CPU_PRI_PERF		= 20,
-
 	/* bring up workqueues before normal notifiers and down after */
 	CPU_PRI_WORKQUEUE_UP	= 5,
 	CPU_PRI_WORKQUEUE_DOWN	= -5,
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -1285,41 +1285,6 @@ static inline void perf_restore_debug_st
 
 #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x))
 
-/*
- * This has to have a higher priority than migration_notifier in sched/core.c.
- */
-#define perf_cpu_notifier(fn)						\
-do {									\
-	static struct notifier_block fn##_nb =				\
-		{ .notifier_call = fn, .priority = CPU_PRI_PERF };	\
-	unsigned long cpu = smp_processor_id();				\
-	unsigned long flags;						\
-									\
-	cpu_notifier_register_begin();					\
-	fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE,			\
-		(void *)(unsigned long)cpu);				\
-	local_irq_save(flags);						\
-	fn(&fn##_nb, (unsigned long)CPU_STARTING,			\
-		(void *)(unsigned long)cpu);				\
-	local_irq_restore(flags);					\
-	fn(&fn##_nb, (unsigned long)CPU_ONLINE,				\
-		(void *)(unsigned long)cpu);				\
-	__register_cpu_notifier(&fn##_nb);				\
-	cpu_notifier_register_done();					\
-} while (0)
-
-/*
- * Bare-bones version of perf_cpu_notifier(), which doesn't invoke the
- * callback for already online CPUs.
- */
-#define __perf_cpu_notifier(fn)						\
-do {									\
-	static struct notifier_block fn##_nb =				\
-		{ .notifier_call = fn, .priority = CPU_PRI_PERF };	\
-									\
-	__register_cpu_notifier(&fn##_nb);				\
-} while (0)
-
 struct perf_pmu_events_attr {
 	struct device_attribute attr;
 	u64 id;

[toc] | [next] | [standalone]


#1440655

FromIngo Molnar <mingo@kernel.org>
Date2016-07-11 16:40 +0200
Message-ID<rTKxk-8gc-7@gated-at.bofh.it>
In reply to#1440579
* Anna-Maria Gleixner <anna-maria@linutronix.de> wrote:

> All users converted to state machine callbacks.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>

The SOB sequence is weird - is a From: Thomas line missing?

Thanks,

	Ingo

[toc] | [prev] | [next] | [standalone]


#1440683

FromAnna-Maria Gleixner <anna-maria@linutronix.de>
Date2016-07-11 16:50 +0200
Message-ID<rTKH1-8jQ-55@gated-at.bofh.it>
In reply to#1440655
On Mon, 11 Jul 2016, Ingo Molnar wrote:

> 
> * Anna-Maria Gleixner <anna-maria@linutronix.de> wrote:
> 
> > All users converted to state machine callbacks.
> > 
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
> 
> The SOB sequence is weird - is a From: Thomas line missing?
> 

Yes, I'm sorry.

Thanks,
	Anna-Maria

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web