mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Jan Polensky <japo@linux.ibm.com>
Cc: gor@linux.ibm.com, agordeev@linux.ibm.com,
	borntraeger@linux.ibm.com, svens@linux.ibm.com,
	ciunas@linux.ibm.com, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] s390/rwlock: Add contention tracepoints to rwlock slowpath
Date: Mon, 14 Sep 2026 19:02:53 +0200	[thread overview]
Message-ID: <20260914170253.14910D83-hca@linux.ibm.com> (raw)
In-Reply-To: <20260908135843.1384367-1-japo@linux.ibm.com>

On Tue, Sep 08, 2026 at 03:58:43PM +0200, Jan Polensky wrote:
> Instrument arch_read_lock_wait() and arch_write_lock_wait() with
> trace_contention_begin() and trace_contention_end().
> 
> These tracepoints are used by lock contention analysis tools such as
> perf lock contention to identify contended rwlocks and measure wait
> times. The generic implementation in kernel/locking/qrwlock.c already
> emits the same events from its read and write slowpaths.
> 
> For arch_read_lock_wait(), the in_interrupt() fast-path is intentionally
> left outside the tracepoint scope. That path spins without entering the
> wait queue, so it does not represent queue-based contention and its
> duration is not comparable to the normal slowpath. This matches the
> behaviour of queued_read_lock_slowpath() in qrwlock.c.
> 
> The include for <trace/events/lock.h> is already present from
> commit ffa796cc1f45 ("s390/spinlock: Add contention tracepoints to
> lock slowpath").
> 
> Signed-off-by: Jan Polensky <japo@linux.ibm.com>
> ---
> v1 -> v2:
> - Fix tracepoint placement in arch_read_lock_wait() to avoid recursion deadlocks.
> 
>  arch/s390/lib/spinlock.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks!

      reply	other threads:[~2026-09-14 17:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 13:58 Jan Polensky
2026-09-14 17:02 ` Heiko Carstens [this message]

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=20260914170253.14910D83-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=ciunas@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=japo@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=svens@linux.ibm.com \
    /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®