lkml.org 
[lkml]   [2023]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH RFC v7 07/23] dept: Apply sdt_might_sleep_strong() to wait_for_completion()/complete()
    Date
    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

    \
     
     \ /
      Last update: 2023-03-26 23:46    [W:2.958 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site