netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rick Jones <rick.jones2@hp.com>
To: Shawn Bohrer <sbohrer@rgmadvisors.com>
Cc: netdev@vger.kernel.org
Subject: Re: Understanding lock contention in __udp4_lib_mcast_deliver
Date: Thu, 27 Jun 2013 15:03:15 -0700	[thread overview]
Message-ID: <51CCB6A3.9080806@hp.com> (raw)
In-Reply-To: <20130627215411.GC5936@sbohrermbp13-local.rgmadvisors.com>

On 06/27/2013 02:54 PM, Shawn Bohrer wrote:
> On Thu, Jun 27, 2013 at 01:46:58PM -0700, Rick Jones wrote:
>> How do you know that time is actually contention and not simply
>> acquire and release overhead?
>
> Excellent point, and that could be the problem with my thinking.  I
> just now tried (unsuccessfully) to use lockstat to see if there was
> any contention reported.  I read Documentation/lockstat.txt and
> followed the instructions but the lock in question did not appear to
> be in the output.  I think I'm going to have to go with the assumption
> that this is just acquire and release overhead.

I think there is a way to get perf to "annotate" (iirc that is the term 
it uses) the report to show hits at the instruction level.  Ostensibly 
one could then look and see how many of the hits were for the 
acquire/release part of the routine, and how much was for the actual 
contention.

Another way to go, perhaps, would be to break-out the "contention" 
portion into a separate routine.  Then the question of contention versus 
acquire/release would be clearly answered in a profile without needing 
to take the annotation path.  Long ago and far away in IA64 land that 
was done.  An example can be seen in:

ftp://ftp.netperf.org/iptable_scaling/full_iptables/32_core_net_next_full_iptables_cycles.txt

where you will see "ia64_spinlock_contention" rather high in the 
profile. (That was taken with HP's "caliper" tool, when perfmon was the 
mechanism in use for accessing performance counters)

rick jones

  reply	other threads:[~2013-06-27 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 19:22 Understanding lock contention in __udp4_lib_mcast_deliver Shawn Bohrer
2013-06-27 19:58 ` Rick Jones
2013-06-27 20:20   ` Shawn Bohrer
2013-06-27 20:46     ` Rick Jones
2013-06-27 21:54       ` Shawn Bohrer
2013-06-27 22:03         ` Rick Jones [this message]
2013-06-27 22:44           ` Shawn Bohrer
2013-07-02 20:16             ` Eric Dumazet
2013-06-27 21:39 ` Or Gerlitz
2013-06-27 21:58   ` Shawn Bohrer

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=51CCB6A3.9080806@hp.com \
    --to=rick.jones2@hp.com \
    --cc=netdev@vger.kernel.org \
    --cc=sbohrer@rgmadvisors.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;
as well as URLs for NNTP newsgroup(s).