Re: [PATCH v5 3/8] cleanup.h: Introduce DEFINE_INACTIVE_GUARD and activate_guard

From
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date
2024-08-28 13:58:50
Also in
bpf, lkml
Reply to
Steven Rostedt, 2024-08-19
On 2024-08-20 01:00, Steven Rostedt wrote:
On Thu, 27 Jun 2024 11:23:35 -0400
Mathieu Desnoyers [off-list ref] wrote:
quoted
To cover scenarios where the scope of the guard differs from the scope
of its activation, introduce DEFINE_INACTIVE_GUARD() and activate_guard().

Here is an example use for a conditionally activated guard variable:

void func(bool a)
{
	DEFINE_INACTIVE_GUARD(preempt_notrace, myguard);

	[...]
	if (a) {
		might_sleep();
		activate_guard(preempt_notrace, myguard)();
	}
	[ protected code ]
}
Hi Mathieu,

The three cleanup patches fail to apply (I believe one has already been
fixed by Ingo too). Could you have the clean up patches be a separate
series that is likely to get in, especially since it's more of a moving
target.
Then it would make sense to split this into two series: one for the
guard stuff, and one for tracing which depends on the first one.

I'll do that.

Mathieu
Thanks,

-- Steve
-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
Thread (11 messages) 11 messages, 2 authors, last reply 2024-08-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help