public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse•de>
To: Rick Jones <rick.jones2@hp•com>
Cc: Linux Network Development list <netdev@vger•kernel.org>
Subject: Re: "meaningful" spinlock contention when bound to non-intr CPU?
Date: 02 Feb 2007 20:21:37 +0100	[thread overview]
Message-ID: <p731wl8nz5q.fsf@bingen.suse.de> (raw)
In-Reply-To: <45C242C9.1010601@hp.com>

Rick Jones <rick.jones2@hp•com> writes:
> 
> Still, does this look like something worth persuing?  In a past
> life/OS when one was able to eliminate one percentage point of
> spinlock contention, two percentage points of improvement ensued.

The stack is really designed to go fast with per CPU local RX processing 
of packets. This normally works because waking on up a task 
the scheduler tries to move it to that CPU. Since the wakeups are
on the CPU that process the incoming packets it should usually
end up correctly.

The trouble is when your NICs are so fast that a single
CPU can't keep up, or when you have programs that process many
different sockets from a single thread.

The fast NIC case will be eventually fixed by adding proper
support for MSI-X and connection hashing. Then the NIC can fan 
out to multiple interrupts and use multiple CPUs to process
the incoming packets. 

Then there is the case of a single process having many 
sockets from different NICs This will be of course somewhat slower
because there will be cross CPU traffic. However there should
be not much socket lock contention because a process handling
many sockets will be hopefully unlikely to bang on each of
its many sockets at the exactly same time as the stack
receives RX packets. This should also eliminate the spinlock
contenion.

>From that theory your test sounds somewhat unrealistic to me. 

Do you have any evidence you're modelling a real world scenario
here? I somehow doubt it.

-Andi 

  parent reply	other threads:[~2007-02-02 18:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-01 19:43 "meaningful" spinlock contention when bound to non-intr CPU? Rick Jones
2007-02-01 19:46 ` Rick Jones
2007-02-02 16:47 ` Jesse Brandeburg
2007-02-02 18:17   ` Rick Jones
2007-02-02 19:21 ` Andi Kleen [this message]
2007-02-02 18:46   ` Rick Jones
2007-02-02 19:06     ` Andi Kleen
2007-02-02 19:54       ` Rick Jones
2007-02-02 20:20         ` Andi Kleen
2007-02-02 20:41           ` Rick Jones

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=p731wl8nz5q.fsf@bingen.suse.de \
    --to=ak@suse$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=rick.jones2@hp$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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