From: Waiman Long <longman@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>, Will Deacon <will@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] locking: Add __lockfunc to slow path functions
Date: Tue, 9 Aug 2022 11:05:31 -0400 [thread overview]
Message-ID: <7b1c463c-c912-ba08-bac4-99d45e45f7e1@redhat.com> (raw)
In-Reply-To: <20220808175956.592707-1-namhyung@kernel.org>
On 8/8/22 13:59, Namhyung Kim wrote:
> So that we can skip the functions in the perf lock contention and other
> places like /proc/PID/wchan.
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> kernel/locking/qrwlock.c | 4 ++--
> kernel/locking/qspinlock.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/locking/qrwlock.c b/kernel/locking/qrwlock.c
> index 2e1600906c9f..d2ef312a8611 100644
> --- a/kernel/locking/qrwlock.c
> +++ b/kernel/locking/qrwlock.c
> @@ -18,7 +18,7 @@
> * queued_read_lock_slowpath - acquire read lock of a queued rwlock
> * @lock: Pointer to queued rwlock structure
> */
> -void queued_read_lock_slowpath(struct qrwlock *lock)
> +void __lockfunc queued_read_lock_slowpath(struct qrwlock *lock)
> {
> /*
> * Readers come here when they cannot get the lock without waiting
> @@ -63,7 +63,7 @@ EXPORT_SYMBOL(queued_read_lock_slowpath);
> * queued_write_lock_slowpath - acquire write lock of a queued rwlock
> * @lock : Pointer to queued rwlock structure
> */
> -void queued_write_lock_slowpath(struct qrwlock *lock)
> +void __lockfunc queued_write_lock_slowpath(struct qrwlock *lock)
> {
> int cnts;
>
> diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
> index 65a9a10caa6f..2b23378775fe 100644
> --- a/kernel/locking/qspinlock.c
> +++ b/kernel/locking/qspinlock.c
> @@ -313,7 +313,7 @@ static __always_inline u32 __pv_wait_head_or_lock(struct qspinlock *lock,
> * contended : (*,x,y) +--> (*,0,0) ---> (*,0,1) -' :
> * queue : ^--' :
> */
> -void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val)
> +void __lockfunc queued_spin_lock_slowpath(struct qspinlock *lock, u32 val)
> {
> struct mcs_spinlock *prev, *next, *node;
> u32 old, tail;
For completeness, I think you should also add it to the
__pv_queued_spin_unlock() and __pv_queued_spin_unlock_slowpath()
function in kernel/locking/qspinlock_paravirt.h. Perhaps even the
assembly code in arch/x86/include/asm/qspinlock_paravirt.h.
Cheers,
Longman
next prev parent reply other threads:[~2022-08-09 15:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-08 17:59 Namhyung Kim
2022-08-09 15:05 ` Waiman Long [this message]
2022-08-09 21:13 ` Namhyung Kim
2022-08-09 23:09 ` Waiman Long
2022-08-09 23:37 ` Namhyung Kim
2022-08-10 21:00 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7b1c463c-c912-ba08-bac4-99d45e45f7e1@redhat.com \
--to=longman@redhat.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®