#include <wrapper/ringbuffer/iterator.h>
#include <wrapper/ringbuffer/nohz.h>
#include <wrapper/atomic.h>
#include <wrapper/ringbuffer/iterator.h>
#include <wrapper/ringbuffer/nohz.h>
#include <wrapper/atomic.h>
#include <wrapper/kref.h>
#include <wrapper/percpu-defs.h>
#include <wrapper/timer.h>
#include <wrapper/kref.h>
#include <wrapper/percpu-defs.h>
#include <wrapper/timer.h>
chan->cpu_hp_enable = 0;
for_each_online_cpu(cpu) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
chan->cpu_hp_enable = 0;
for_each_online_cpu(cpu) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
const struct lib_ring_buffer_config *config = &chan->backend.config;
if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
const struct lib_ring_buffer_config *config = &chan->backend.config;
if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
for_each_channel_cpu(cpu, chan) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
cpu);
lib_ring_buffer_set_quiescent(buf);
}
for_each_channel_cpu(cpu, chan) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
cpu);
lib_ring_buffer_set_quiescent(buf);
}
const struct lib_ring_buffer_config *config = &chan->backend.config;
if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
const struct lib_ring_buffer_config *config = &chan->backend.config;
if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
for_each_channel_cpu(cpu, chan) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
cpu);
lib_ring_buffer_clear_quiescent(buf);
}
for_each_channel_cpu(cpu, chan) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
cpu);
lib_ring_buffer_clear_quiescent(buf);
}
chan->cpuhp_prepare.component = LTTNG_RING_BUFFER_FRONTEND;
ret = cpuhp_state_add_instance_nocalls(lttng_rb_hp_prepare,
&chan->cpuhp_prepare.node);
chan->cpuhp_prepare.component = LTTNG_RING_BUFFER_FRONTEND;
ret = cpuhp_state_add_instance_nocalls(lttng_rb_hp_prepare,
&chan->cpuhp_prepare.node);
for_each_online_cpu(cpu) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
cpu);
for_each_online_cpu(cpu) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
cpu);
#else
for_each_possible_cpu(cpu) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
#else
for_each_possible_cpu(cpu) {
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
#if defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER)
/* Only benefit from NO_HZ idle with per-cpu buffers for now. */
#if defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER)
/* Only benefit from NO_HZ idle with per-cpu buffers for now. */
cpuhp_online_error:
ret = cpuhp_state_remove_instance_nocalls(lttng_rb_hp_prepare,
&chan->cpuhp_prepare.node);
WARN_ON(ret);
cpuhp_prepare_error:
cpuhp_online_error:
ret = cpuhp_state_remove_instance_nocalls(lttng_rb_hp_prepare,
&chan->cpuhp_prepare.node);
WARN_ON(ret);
cpuhp_prepare_error: