From: Mathieu Desnoyers Date: Wed, 11 May 2011 15:25:40 +0000 (-0400) Subject: Update nohz X-Git-Tag: v2.0-pre1~160 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=23b908b06549d9eafa939001cbe9df806fc1cfd4;p=lttng-modules.git Update nohz Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/ring_buffer_frontend.c b/lib/ringbuffer/ring_buffer_frontend.c index 9ecabb0b..d48d66b3 100644 --- a/lib/ringbuffer/ring_buffer_frontend.c +++ b/lib/ringbuffer/ring_buffer_frontend.c @@ -437,7 +437,7 @@ int __cpuinit lib_ring_buffer_cpu_hp_callback(struct notifier_block *nb, } #endif -#if defined(CONFIG_NO_HZ) && !defined(CONFIG_LIB_RING_BUFFER) +#if defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER) /* * For per-cpu buffers, call the reader wakeups before switching the buffer, so * that wake-up-tracing generated events are flushed before going idle (in @@ -517,7 +517,7 @@ void notrace lib_ring_buffer_tick_nohz_restart(void) atomic_notifier_call_chain(&tick_nohz_notifier, TICK_NOHZ_RESTART, NULL); } -#endif /* defined(CONFIG_NO_HZ) && !defined(CONFIG_LIB_RING_BUFFER) */ +#endif /* defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER) */ /* * Holds CPU hotplug. @@ -627,14 +627,14 @@ struct channel *channel_create(const struct lib_ring_buffer_config *config, init_waitqueue_head(&chan->read_wait); if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { -#ifdef CONFIG_NO_HZ +#if defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER) /* Only benefit from NO_HZ idle with per-cpu buffers for now. */ chan->tick_nohz_notifier.notifier_call = ring_buffer_tick_nohz_callback; chan->tick_nohz_notifier.priority = ~0U; atomic_notifier_chain_register(&tick_nohz_notifier, &chan->tick_nohz_notifier); -#endif /* CONFIG_NO_HZ */ +#endif /* defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER) */ /* * In case of non-hotplug cpu, if the ring-buffer is allocated