X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt-ring-buffer-metadata-client.h;h=dc0e36e1ec1515a31ca7514b75b7e5e10a798378;hb=71c1d8431c8b94c34332cf2fbdbd7c9dc5f1489a;hp=65509f8475a9d87f2a9279103c9d2f326aa9106f;hpb=99a933172642e2942dc8918097bbb78a6b3838e1;p=lttng-modules.git diff --git a/ltt-ring-buffer-metadata-client.h b/ltt-ring-buffer-metadata-client.h index 65509f84..dc0e36e1 100644 --- a/ltt-ring-buffer-metadata-client.h +++ b/ltt-ring-buffer-metadata-client.h @@ -116,7 +116,11 @@ static void client_buffer_end(struct lib_ring_buffer *buf, u64 tsc, header->content_size = data_size * CHAR_BIT; /* in bits */ header->packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */ - records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf); + /* + * We do not care about the records lost count, because the metadata + * channel waits and retry. + */ + (void) lib_ring_buffer_get_records_lost_full(&client_config, buf); records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf); records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf); WARN_ON_ONCE(records_lost != 0); @@ -238,9 +242,11 @@ size_t ltt_packet_avail_size(struct channel *chan) } static -wait_queue_head_t *ltt_get_reader_wait_queue(struct channel *chan) +wait_queue_head_t *ltt_get_writer_buf_wait_queue(struct channel *chan, int cpu) { - return &chan->read_wait; + struct lib_ring_buffer *buf = channel_get_ring_buffer(&client_config, + chan, cpu); + return &buf->write_wait; } static @@ -275,7 +281,7 @@ static struct ltt_transport ltt_relay_transport = { .event_commit = ltt_event_commit, .event_write = ltt_event_write, .packet_avail_size = ltt_packet_avail_size, - .get_reader_wait_queue = ltt_get_reader_wait_queue, + .get_writer_buf_wait_queue = ltt_get_writer_buf_wait_queue, .get_hp_wait_queue = ltt_get_hp_wait_queue, .is_finalized = ltt_is_finalized, .is_disabled = ltt_is_disabled,