From: Matti Aarnio <matti.aarnio@zmailer.org>
To: "Hurwitz Justin W." <hurwitz@lanl.gov>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How many copies to get from NIC RX to user read()?
Date: Wed, 10 Jul 2002 11:29:16 +0300 [thread overview]
Message-ID: <20020710112916.R28720@mea-ext.zmailer.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0207091625460.2905-100000@alvie-mail.lanl.gov>; from hurwitz@lanl.gov on Tue, Jul 09, 2002 at 04:29:35PM -0600
On Tue, Jul 09, 2002 at 04:29:35PM -0600, Hurwitz Justin W. wrote:
> Please Cc: me in your responses.
>
> The story so far:
>
> I've been continuing to muck around with the stack, trying both to improve
> overall performance, and specifically to improve rx relative to tx
> performance, primarily in gig-and-beyond (e.g., Quadrics) environments.
...
> The direct question:
>
> How many times is data copied between the time that it is received at the
> NIC and when the user's call to read() returns the data?
> The reason for the question:
>
> I could've sworn I heard the stack was single-copy on both the TX and RX
> sides. But, it doesn't look to me like it is. Rather, it looks like there
> is one copy in tcp_rcv_estabilshed() (via tcp_copy_to_iovec()), and a
> second copy in tcp_recvmsg() (which is called when the user calls read()).
> Both of these copies are, I believe, done by skb_copy_datagram_iovec().
I suspect that in many cases there is third copy right in the network
card driver to realign data so that TCP frame begins at a 32-bit boundary.
Perhaps that is only for RISC CPU systems (e.g. Alpha, primarily.)
Can the GigE cards do ethernet-frame reception pre-alignment so that
after the 14 byte ethernet header, the TCP frame begins at 32-bit
boundary ?
...
> Cheers,
> --Gus
/Matti Aarnio
next prev parent reply other threads:[~2002-07-10 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-09 22:29 Hurwitz Justin W.
2002-07-09 23:11 ` Alan Cox
2002-07-10 8:29 ` Matti Aarnio [this message]
2002-07-11 2:12 ` David S. Miller
2002-07-10 15:52 niv
2002-07-10 21:15 ` Hurwitz Justin W.
2002-07-10 21:27 ` Nivedita Singhvi
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=20020710112916.R28720@mea-ext.zmailer.org \
--to=matti.aarnio@zmailer.org \
--cc=hurwitz@lanl.gov \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®