From: Jun Wang <junwang123@gmail.com>
To: linux-perf-users@vger.kernel.org
Subject: stack trace of threads that wake up a specific target userspace thread blocking in epoll_wait
Date: Fri, 25 Apr 2014 09:33:40 -0700 [thread overview]
Message-ID: <CANHDG4anUmNmAxwx99fFTLCSFGNkENg6mZFun7N6dPZLGmSkqQ@mail.gmail.com> (raw)
Hi Everyone,
I have a profiling tool question that could go beyond perf.
In an application, there are threads blocking on epoll_wait(). The
file descriptors are sockets connecting to other servers in a data
center with less than 1ms network latency. On normal systems, the
delay to wake up epoll_wait is much less than 1ms. It is noticed on a
system that sometimes it takes an unbelievable 30ms delay to wake up
the thread blocking in epoll_wait(). To be exact, the delay of
reference here is between tcp_rcv_established() and epoll_wait.return.
I wonder whether there is a way to dump out the stack trace of
threads, or some other kernel entities, that wake up that thread. The
idea is to figure out why there is a huge delay by looking at how the
delayed is ended, and by whom/what.
epoll wakeup internels in the kernel space can be referred to at
http://www.slideshare.net/llj098/epoll-from-the-kernel-side.
As a reference, there is a dtrace script that does this on Solaris.
https://github.com/brendangregg/dtrace-cloud-tools/blob/master/system/cv_wakeup_slow.d
Would perf/systemTap or other Linux tools be helpful?
Thanks,
Jun
next reply other threads:[~2014-04-25 16:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-25 16:33 Jun Wang [this message]
2014-04-25 17:01 ` stack trace of threads that wake up a specific target userspace thread blocking in epoll_wait David Ahern
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=CANHDG4anUmNmAxwx99fFTLCSFGNkENg6mZFun7N6dPZLGmSkqQ@mail.gmail.com \
--to=junwang123@gmail.com \
--cc=linux-perf-users@vger.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;
as well as URLs for NNTP newsgroup(s).