lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANDhNCo2=2qT6qzJf97cdsjPhCue8U98yaHhxcL1RbNtGK+98Q@mail.gmail.com>
Date:   Tue, 11 Apr 2023 20:03:15 -0700
From:   John Stultz <jstultz@...gle.com>
To:     Waiman Long <longman@...hat.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Minchan Kim <minchan@...nel.org>,
        Tim Murray <timmurray@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>, kernel-team@...roid.com,
        stable@...r.kernel.org
Subject: Re: [RFC][PATCH] locking/rwsem: Add __sched annotation to __down_read_common()

On Tue, Apr 11, 2023 at 7:58 PM Waiman Long <longman@...hat.com> wrote:
>
> On 4/11/23 22:38, John Stultz wrote:
> > Apparently despite it being marked inline, the compiler
> > may not inline __down_read_common() which makes it difficult
> > to identify the cause of lock contention, as the blocked
> > function will always be listed as __down_read_common().
> >
> > So this patch adds __sched annotation to the function so
> > the calling function will instead be listed.
> >
...
> > -static inline int __down_read_common(struct rw_semaphore *sem, int state)
> > +static inline __sched int __down_read_common(struct rw_semaphore *sem, int state)
> >   {
> >       int ret = 0;
> >       long count;
>
> Change inline to __always_inline instead of adding __sched.
> __down_read_common() is not supposed to be a standalone function.

Sounds good. I'll give that a go and will re-submit!
Thanks for the review!
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ