lkml.org 
[lkml]   [2021]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 09/10] user_events: Optimize writing events by only copying data once
On Mon, 8 Nov 2021 15:00:34 -0800
Beau Belgrave <beaub@linux.microsoft.com> wrote:

> > > - memcpy(entry + 1, data, datalen);
> > > + if (unlikely(!copy_nofault(entry + 1, i->count, i)))
> >
> > Need:
> > __trace_event_discard_commit(event_buffer.buffer, event_buffer.event);
> >
> > Because the trace_event_buffer_reserve() will not only allocate space on
> > the ring buffer, but may also disable preemption.
> >
> > -- Steve
> >
>
> Ah, thank you!

Which reminds me that trace_event_buffer_reserve() expects to be called
with preemption disabled. And I'm guessing that may not be the case for you.

I'll change this so that it always disables preemption even if it uses the
filter buffer, and *always* disables preemption on return.

-- Steve

\
 
 \ /
  Last update: 2021-11-09 00:05    [W:0.075 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site