On Tue, 15 Jul 2025 14:06:50 -0400 Steven Rostedt <rost...@goodmis.org> wrote:
> > > > + * Return: 0 if the callback successfully was queued. > > > > + * UNWIND_ALREADY_PENDING if the the callback was already > > > > queued. > > > > + * UNWIND_ALREADY_EXECUTED if the callback was already called > > > > + * (and will not be called again) > > > > * Negative if there's an error. > > > > * @cookie holds the cookie of the first request by any user > > > > */ > > > > > > Lots of babbling in the Changelog, but no real elucidation as to why you > > > need this second return value. > > > > > > AFAICT it serves no real purpose; the users of this function should not > > > care. The only difference is that the unwind reference (your cookie) > > > becomes a backward reference instead of a forward reference. But why > > > would anybody care? > > > > Older versions of the code required it. I think I can remove it now. > > Ah it is still used in the perf code: > > perf_callchain() has: > > if (defer_user) { > int ret = deferred_request(event); > if (!ret) > local_inc(&event->ctx->nr_no_switch_fast); Hmm, I guess this could work if it returned non zero for both already queued and already executed. So it doesn't need to be two different values. -- Steve > else if (ret < 0) > defer_user = false; > }