netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: "Matthew Faulkner" <matthew.faulkner@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: localhost network processing on smp machines
Date: Tue, 06 Nov 2007 11:53:07 +0100	[thread overview]
Message-ID: <p73tznz1w8c.fsf@bingen.suse.de> (raw)
In-Reply-To: <c565abbb0711051248g76fbd695w2dbb13f0e014087d@mail.gmail.com> (Matthew Faulkner's message of "Mon\, 5 Nov 2007 20\:48\:39 +0000")

"Matthew Faulkner" <matthew.faulkner@gmail.com> writes:

> I'm probably being stupid and very confused here. Appologies if it is
> a stupid question.
>
> For a particular test I assign a client to core 1 and a server to core
> 0. My first assumption was all the sending side kernel TCP/IP
> processing will be done on core 1 and all the receiving side
> processing on core 0. However, having looked at the linux TCP/IP code,
> more specifically the loopback device code, when the loopbacks
> dev_queue_xmit function gets called it simply passes the skb to the
> netif_rx function. Therefore my question is thus, when i assign the
> sending / receiving side to different cores is the actual TCP/IP
> processing done the assigned sending / receiving cores ? or is TCP/IP
> processing done on the sending side only until a certain point? 
> it simply a single core that does all the TCP/IP processing. If it's
> the first two and you have any idea, could you point me where in the
> kernel the cores the processing swap over.

You need to define what you mean with TCP/IP processing. It has lots
of little sub-actions.  For the loopback case some will always run on
the sender side (IP, socket demultiplex, some will sometimes run on
either depending on workload (using TCP prequeue and depending on the
tcp_latency setting and how quickly the receiver schedules), and some
always on the receiver side (recvmsg user processing)

-Andi

      reply	other threads:[~2007-11-06 10:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-05 20:48 localhost network processing on smp machines Matthew Faulkner
2007-11-06 10:53 ` Andi Kleen [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=p73tznz1w8c.fsf@bingen.suse.de \
    --to=andi@firstfloor.org \
    --cc=matthew.faulkner@gmail.com \
    --cc=netdev@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).