Re: [PATCH RFC v7 07/23] dept: Apply sdt_might_sleep_strong() to wait_for_completion()/complete()

From
Thomas Gleixner <hidden>
Date
2023-01-18 13:33:13
Also in
dri-devel, linux-block, linux-ext4, linux-fsdevel, linux-mm, lkml
Reply to
Byungchul Park, 2023-01-09
On Mon, Jan 09 2023 at 12:33, Byungchul Park wrote:
Makes Dept able to track dependencies by
wait_for_completion()/complete().

In order to obtain the meaningful caller points, replace all the
wait_for_completion*() declarations with macros in the header.
That's just wrong.
-extern void wait_for_completion(struct completion *);
+extern void raw_wait_for_completion(struct completion *);
quoted hunk ↗ jump to hunk
+#define wait_for_completion(x)					\
+({								\
+	sdt_might_sleep_strong(NULL);				\
+	raw_wait_for_completion(x);				\
+	sdt_might_sleep_finish();				\
+})
The very same can be achieved with a proper annotation which does not
enforce THIS_IP but allows to use __builtin_return_address($N). That's
what everything else uses too.

Thanks,

        tglx
Thread (47 messages) 47 messages, 7 authors, last reply 2023-01-21
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