From: "Chris Friesen" <cfriesen@nortel.com>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: netdev@vger.kernel.org, Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: seeing strange values for tcp sk_rmem_alloc
Date: Tue, 01 Dec 2009 11:28:50 -0600 [thread overview]
Message-ID: <4B155252.1040604@nortel.com> (raw)
In-Reply-To: <4B154B29.1030807@cosmosbay.com>
On 12/01/2009 10:58 AM, Eric Dumazet wrote:
> Me wondering why you think sk_rmem_alloc is about TX side.
> Its used in RX path. rmem means ReadMemory.
Yep, I realize this.
> You can send 1 Gbytes of data, and sk_rmem_alloc doesnt change, if your
> TCP stream is unidirectionnal.
>
> sk_rmem_alloc grows when skb are queued into receive queue
> sk_rmem_alloc shrinks when application reads this receive queue.
I realize this. I sent the data from a socket to itself. It could just
as easily be done with two tcp sockets. The important thing is that I
control both the tx and rx sides, so I know how much data should be
present in the rx queue at any point in time.
The part that surprised me was that I could send multiple chunks of data
without sk_rmem_alloc changing on the socket to which the data was being
sent. Then it would jump up by a large amount (up to 20K) all at once.
I'm starting to suspect that the discrepency might have something to do
with the skb_copy_datagram_iovec() call in tcp_data_queue(), and how
skb_set_owner_r() is only called if "eaten" is <= 0. This could be
totally off-base though.
Chris
next prev parent reply other threads:[~2009-12-01 17:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 16:16 seeing strange values for tcp sk_rmem_alloc Chris Friesen
2009-12-01 16:18 ` Chris Friesen
2009-12-01 16:58 ` Eric Dumazet
2009-12-01 17:28 ` Chris Friesen [this message]
2009-12-01 17:52 ` Eric Dumazet
2009-12-03 16:55 ` Chris Friesen
2009-12-03 17:04 ` Eric Dumazet
2009-12-03 21:40 ` Chris Friesen
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=4B155252.1040604@nortel.com \
--to=cfriesen@nortel.com \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
--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).