public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Finding out who's holding a lock?
Date: Sat, 24 Aug 2013 06:50:45 -0400	[thread overview]
Message-ID: <52189005.30009@hurleysoftware.com> (raw)
In-Reply-To: <CALCETrUobqJKGCma_8=qsG=w3Tm3=ttZB==DwdHyGBkJDBYV_g@mail.gmail.com>

On 08/22/2013 08:52 PM, Andy Lutomirski wrote:
> My program is occasionally seeing slow page faults.  latencytop says
> they're slow because they're waiting for read access to mmap_sem, but
> latencytop isn't showing any other thread in the process blocking.
>
> Is there any straightforward way to find out who called down_write on
> mmap_sem when down_read is slow?

Build with CONFIG_LOCKDEP (Kernel Debugging -> Lock Debugging ->
"Lock Debugging: prove locking correctness").

When you experience the slowdown, sysrq + d (displays all currently
held locks). sysrq can also be programmatically triggered with
"echo d > /proc/sysrq-trigger" or equivalent.

Regards,
Peter Hurley


      reply	other threads:[~2013-08-24 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23  0:52 Finding out who's holding a lock? Andy Lutomirski
2013-08-24 10:50 ` Peter Hurley [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=52189005.30009@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    /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