netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Maloy <jon.maloy@ericsson.com>
To: David Miller <davem@davemloft.net>, <jon.maloy@ericsson.com>
Cc: <netdev@vger.kernel.org>, <paul.gortmaker@windriver.com>,
	<erik.hugne@ericsson.com>, <ying.xue@windriver.com>,
	<tipc-discussion@lists.sourceforge.net>
Subject: Re: [PATCH net-next 1/8] tipc: decrease connection flow control window
Date: Tue, 13 May 2014 13:27:45 -0400	[thread overview]
Message-ID: <53725611.8070808@ericsson.com> (raw)
In-Reply-To: <20140513.000530.154961879638643331.davem@davemloft.net>

On 05/13/2014 12:05 AM, David Miller wrote:
> From: Jon Maloy <jon.maloy@ericsson.com>
> Date: Fri,  9 May 2014 09:13:22 -0400
>
>> Memory overhead when allocating big buffers for data transfer may
>> be quite significant. E.g., truesize of a 64 KB buffer turns out
>> to be 132 KB, 2 x the requested size.
>>
>> This invalidates the "worst case" calculation we have been
>> using to determine the default socket receive buffer limit,
>> which is based on the assumption that 1024x64KB = 67MB buffers
>> may be queued up on a socket.
>>
>> Since TIPC connections cannot survive hitting the buffer limit,
>> we have to compensate for this overhead.
>>
>> We do that in this commit by dividing the fix connection flow
>> control window from 1024 (2*512) messages to 512 (2*256). Since
>> older version nodes send out acks at 512 message intervals,
>> compatibility with such nodes is guaranteed, although performance
>> may be non-optimal in such cases.
>>
>> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
>> Reviewed-by: Ying Xue <ying.xue@windriver.com>
> So all I have to do is open 64 sockets to make TIPC commit to 4GB
> of ram at once?

Yes. We are fully aware of this. But this is the way it has been the last
two years, and this series changes nothing regarding that. It was
even more before.

>
> I really think you need to rethink this, the socket limits are
> there for a reason.

We have already done that. A couple of months from now, when
we have finished our current redesign of the locking policy
and transmission path code,  you can expect a series of commits
where the connection-level flow control is completely re-worked.
It will be byte-based, and be pretty similar to what we have in TCP.

But, that solution cannot be made backwards compatible with
the current, message based flow control, so we will have to keep
supporting that one too for a while. We will probably use capability
flags to distinguish between the two, and require active enabling for
any new node to use the old algorithm. I think fixing weaknesses
in the current flow control can be seen as such support, as long
as we don't extend the limits for claimable memory further than
it is now.

Commit #1 is such a fix, while #2 will be valid even when we
introduce the new flow control. The other ones are about completely
different matters.

So, please advise me, should I resubmit the series as a whole,
without patch #1, without ##1 and 2, or do you expect us
to drop everything else until we have a new flow control?
The latter alternative will no doubt cause us some double effort.

Regards
///jon

  reply	other threads:[~2014-05-13 17:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 13:13 [PATCH net-next 0/8] tipc: bug fixes and improvements Jon Maloy
2014-05-09 13:13 ` [PATCH net-next 1/8] tipc: decrease connection flow control window Jon Maloy
2014-05-09 13:30   ` David Laight
2014-05-09 14:27     ` erik.hugne
2014-05-09 14:59       ` David Laight
2014-05-09 16:00         ` Jon Maloy
2014-05-09 16:35           ` David Laight
2014-05-09 18:07             ` Jon Maloy
2014-05-13  4:05   ` David Miller
2014-05-13 17:27     ` Jon Maloy [this message]
2014-05-13 22:32       ` David Miller
2014-05-09 13:13 ` [PATCH net-next 2/8] tipc: compensate for double accounting in socket rcv buffer Jon Maloy
2014-05-09 13:13 ` [PATCH net-next 3/8] tipc: don't record link RESET or ACTIVATE messages as traffic Jon Maloy
2014-05-09 13:13 ` [PATCH net-next 4/8] tipc: mark head of reassembly buffer as non-linear Jon Maloy
2014-05-09 13:13 ` [PATCH net-next 5/8] tipc: rename and move message reassembly function Jon Maloy
2014-05-09 13:13 ` [PATCH net-next 6/8] tipc: improve and extend media address conversion functions Jon Maloy
2014-05-09 13:13 ` [PATCH net-next 7/8] tipc: clean up neigbor discovery message reception Jon Maloy
2014-05-09 13:13 ` [PATCH net-next 8/8] tipc: merge port message reception into socket reception function Jon Maloy

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=53725611.8070808@ericsson.com \
    --to=jon.maloy@ericsson.com \
    --cc=davem@davemloft.net \
    --cc=erik.hugne@ericsson.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=tipc-discussion@lists.sourceforge.net \
    --cc=ying.xue@windriver.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).