Messages in this thread | | | Date | Mon, 24 Oct 2022 10:58:12 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH] ring-buffer: Include dropped pages in counting dirty patches |
| |
On Mon, 24 Oct 2022 22:13:28 +0900 Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> > @@ -2020,6 +2029,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages) > > */ > > local_add(page_entries, &cpu_buffer->overrun); > > local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes); > > + local_inc(&cpu_buffer->pages_lost); > > Maybe we can make this part a static helper function so that we don't > repeat it below?
Makes sense. I'll send a v2.
-- Steve
> > > } > > > > /* > > @@ -2504,6 +2514,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer, > > */ > > local_add(entries, &cpu_buffer->overrun); > > local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes); > > + local_inc(&cpu_buffer->pages_lost);
| |