lkml.org 
[lkml]   [2024]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/4] perf: Remove perf_swevent_get_recursion_context() from perf_pending_task().
On 2024-04-09 12:35:46 [+0200], Frederic Weisbecker wrote:
> > > > @@ -6800,10 +6792,6 @@ static void perf_pending_task(struct callback_head *head)
> > > > local_dec(&event->ctx->nr_pending);
> > > > }
> > > >
> > > > - if (rctx >= 0)
> > > > - perf_swevent_put_recursion_context(rctx);
> > > > - preempt_enable_notrace();
> > >
> > > Well, if a software event happens during perf_sigtrap(), the task work
> > > may be requeued endlessly and the task may get stuck in task_work_run()...
> >
> > The last time I checked it had no users in the task context. How would
> > that happen?
>
> I guess many tracepoint events would do the trick. Such as trace_lock_acquire()
> for example.

So the perf_trace_buf_alloc() is invoked from that trace point and
avoids the recursion. And any trace event from within perf_sigtrap()
would trigger the endless loop?

> Thanks.

Sebastian

\
 
 \ /
  Last update: 2024-05-27 16:30    [W:0.068 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site