lkml.org 
[lkml]   [2022]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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);

\
 
 \ /
  Last update: 2022-10-24 18:13    [W:1.685 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site