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

Thomas Gleixner tglx at linutronix.de
Wed Jan 18 12:59:34 UTC 2023


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 *);

> +#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


More information about the dri-devel mailing list