public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaliy Gusev <vgusev@openvz.org>
To: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Andi Kleen <andi@firstfloor.org>,
	David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH][NET] Fix never pruned tcp out-of-order queue
Date: Tue, 15 Apr 2008 17:54:07 +0400	[thread overview]
Message-ID: <200804151754.07397.vgusev@openvz.org> (raw)
In-Reply-To: <20080415115924.GA1550@ms2.inr.ac.ru>

> On 15 April 2008 15:59:24 Alexey Kuznetsov wrote:
> Hello!
> 
> > I still think the guards are pretty much the same as before, sorry:)
> 
> Guards inside tcp_prune_queue() are the same exactly.
> 
> But the patch adds the second point where out-of-order queue is discarded.
> It is when the socket is under rcvbuf, but nevertheless skb cannot
> be queued due to system-wide limit. In that case out-of-order queue 
> is dropped and the limits are rechecked.
> 
> 
> > But why not repeat the whole prune for all cases in this case then?
> 
> Collapsing and tuning rcv_ssthresh was done once, they are not guarded
> by rcvbuf check. So, repeating those steps would be useless.
> 
> The only thing is:
> 
> > e.g. you should probably at least repeat the third step (setting
> > pred_flags to 0) too.
> 
> Formally, this is correct. But this is not necessary, pred_flags reset
> is redundant even in the first place. The fast path is not so fast,
> memory limit is checked explicitly there.
> 
> 
> The patch is not perfect. F.e. tcp_prune_ofo_queue() could see empty
> out-of-order queue, in this case the second sk_stream_rmem_schedule()
> is useless and could be skipped. But it is the second order effect.
> 
> I think this will work.

> Thanks for comments. I will correct second call sk_stream_rmem_schedule()
> and resend new patch.

Does tuning window need to consider free TCP memory (something like
tcp_mem[2] - memory_allocated) ?
 
-- 
Thank,
Vitaliy Gusev

      parent reply	other threads:[~2008-04-15 13:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-14 17:21 [RFC][PATCH][NET] Fix never pruned tcp out-of-order queue Vitaliy Gusev
2008-04-15  7:34 ` David Miller
2008-04-15  7:59 ` Andi Kleen
2008-04-15  8:01   ` David Miller
2008-04-15  8:14     ` Andi Kleen
2008-04-15  8:18       ` David Miller
2008-04-15  8:26         ` Vitaliy Gusev
2008-04-15  8:30           ` Andi Kleen
2008-04-15  9:33             ` Vitaliy Gusev
2008-04-15 11:59             ` Alexey Kuznetsov
2008-04-15 13:47               ` Vitaliy Gusev
2008-04-15 13:54               ` Vitaliy Gusev [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=200804151754.07397.vgusev@openvz.org \
    --to=vgusev@openvz.org \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --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