public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: kuznet@ms2.inr.ac.ru
Cc: mingo@elte.hu, torvalds@transmeta.com, raj@cup.hp.com,
	linux-kernel@vger.kernel.org, davem@redhat.com
Subject: Re: [Fwd: [Fwd: Is sendfile all that sexy? (fwd)]]
Date: Fri, 19 Jan 2001 22:13:27 +0100	[thread overview]
Message-ID: <20010119221327.C8717@athlon.random> (raw)
In-Reply-To: <20010119162552.D3447@athlon.random> <200101191818.VAA24360@ms2.inr.ac.ru>
In-Reply-To: <200101191818.VAA24360@ms2.inr.ac.ru>; from kuznet@ms2.inr.ac.ru on Fri, Jan 19, 2001 at 09:18:04PM +0300

On Fri, Jan 19, 2001 at 09:18:04PM +0300, kuznet@ms2.inr.ac.ru wrote:
> Hello!
> 
> > The "uncork" won't push the last skb on the wire if there is not acknowledged
> > data in the write_queue and the payload of the last skb in the write_queue
> > isn't large MSS. This because the `uncork' will only re-evaluate the
> > write_queue in function of the _nagle_ algorithm, quite correctly because the
> > "uncork" will move frok "cork" to "nagle" (not from "cork" to "nodelay").
> 
> At least for your own implementation of SIOCPUSH has "1" among
> arguments of push_pending_frames, so that this does not happen. 8)8)

I wasn't talking about SIOCPUSH but only about uncorking, I carefully made sure
that SIOCPUSH was interpreting the write_queue from a "nodelay" point of view
(but I didn't noticed the uncorking wasn't doing that ;).

> The second thing, which makes argument above wrong is that
> both classic Nagle and linux-2.4 Nagle (extended by Minshall),
> do not have this problem. Your argument applies to buggy flavor
> of nagling specific to 2.2.

My argument applies to 2.4. The uncork _won't_ push on the wire the last
not mss-sized fragment until it's the last one in the write queue even once
cwnd and receiver window allows that. I think if there would be no problem you
wouldn't be setting nonalge unconditionally to 1 in
2.4/include/net/tcp.h.__tcp_push_pending_frames:

		if (!tcp_skb_is_last(sk, skb))
			nonagle = 1;
		if (!tcp_snd_test(tp, skb, cur_mss, nonagle) ||
		    tcp_write_xmit(sk))
			tcp_check_probe_timer(sk, tp);

> However, SIOCPUSH really affects latency badly in some curcumstances.

Not using SIOCPUSH can only increase latency, and using it can only decrease
latency. Obviously because it allows the last little fragment to be sent before
waiting it to be the last one in the write queue so reducing the time the last
fragment is received from the other end and so in turn reducing the latency of
the reply from the other end. There are no other differences in the behaviour.

It tells to the stack one information that the stack can't know otherwise and
that only the programmer writing the application knows. Knowing that
information can only allow the stack to do a _better_ choice.

What my SIOCPUSH implementation was missing is to keep considering the
write_queue in tp->nonagle=1 mode until somebody writes to the socket (so that
as soon as one acknowledgemnt for the previous data increases the reciver
window and our send window increases as well we can send the last fragment
immediatly without waiting it to be the last one). The first write to the
socket will clear tp->push.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-01-19 21:17 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3A65E825.FFEB194@cup.hp.com>
2001-01-17 19:27 ` [Fwd: [Fwd: Is sendfile all that sexy? (fwd)]] Linus Torvalds
2001-01-17 20:03   ` Rick Jones
2001-01-17 20:38     ` dean gaudet
2001-01-17 20:57       ` Rick Jones
2001-01-18 13:06         ` Ingo Molnar
2001-01-18 14:57           ` Andi Kleen
2001-01-18 18:24           ` Rick Jones
2001-01-19  2:46         ` dean gaudet
2001-01-19  3:03           ` dean gaudet
2001-01-19 19:07           ` Rick Jones
2001-01-19 20:03             ` kuznet
2001-01-19 21:20               ` Rick Jones
2001-01-20 18:03                 ` kuznet
2001-01-22 18:44                   ` Rick Jones
2001-01-20 14:56           ` Kai Henningsen
2001-01-23  7:20             ` dean gaudet
2001-01-20 23:09           ` Lincoln Dale
2001-01-20 23:27             ` James Sutherland
2001-01-21  0:02               ` Chris Wedgwood
2001-01-18 12:56       ` Ingo Molnar
2001-01-25 17:58         ` Jamie Lokier
2001-01-17 21:22     ` Linus Torvalds
2001-01-17 22:17       ` Rick Jones
2001-01-17 22:53         ` Linus Torvalds
2001-01-17 22:44           ` Jonathan Walther
2001-01-18 13:18           ` Ingo Molnar
2001-01-18 16:49             ` Linus Torvalds
2001-01-18 17:32               ` Ingo Molnar
2001-01-18 17:49               ` Zach Brown
2001-01-19  3:16                 ` dean gaudet
2001-01-19  3:56                   ` David Ford
2001-01-18 18:29               ` Rick Jones
2001-01-18 18:50                 ` Linus Torvalds
2001-01-18 19:38               ` Andrea Arcangeli
2001-01-18 19:43                 ` Ingo Molnar
2001-01-18 19:52                   ` Linus Torvalds
2001-01-18 20:11                     ` kuznet
2001-01-18 20:33                     ` Ingo Molnar
2001-01-18 21:14                     ` Andrea Arcangeli
2001-01-18 20:24                   ` Andrea Arcangeli
2001-01-18 20:37                     ` kuznet
2001-01-18 21:04                       ` Andrea Arcangeli
2001-01-19  0:27                         ` Olivier Galibert
2001-01-19  0:59                           ` Rick Jones
2001-01-19 17:52                         ` kuznet
2001-01-19 20:54                           ` Andrea Arcangeli
2001-01-18 20:44                     ` Ingo Molnar
2001-01-18 21:54                       ` Andrea Arcangeli
2001-01-18 21:57                         ` Ingo Molnar
2001-01-18 22:16                           ` Andrea Arcangeli
2001-01-18 22:18                             ` Ingo Molnar
2001-01-19 15:25                               ` Andrea Arcangeli
2001-01-19 18:18                                 ` kuznet
2001-01-19 21:13                                   ` Andrea Arcangeli [this message]
2001-01-20 17:28                                     ` kuznet
2001-01-20 18:14                                       ` Abramo Bagnara
2001-01-20 18:23                                       ` Andrea Arcangeli
2001-01-20 19:05                                         ` kuznet
2001-01-20 19:30                                           ` Andrea Arcangeli
2001-01-20 19:39                                             ` Linus Torvalds
2001-01-20 20:22                                               ` kuznet
2001-01-20 21:20                                                 ` Andrea Arcangeli
2001-01-20 20:56                                               ` Andrea Arcangeli
2001-01-21 18:37                                                 ` kuznet
2001-01-20 19:39                                             ` kuznet
2001-01-20 21:05                                               ` Andrea Arcangeli
2001-01-20 21:31                                               ` Guus Sliepen
2001-01-18 22:20                             ` Ingo Molnar
2001-01-18 19:45                 ` Linus Torvalds
2001-01-18 19:59                 ` kuznet
2001-01-18 20:44                   ` Andrea Arcangeli
2001-01-19  3:25                 ` dean gaudet
2001-01-19  3:35                   ` dean gaudet
2001-01-18  9:34         ` Andi Kleen
2001-01-18 18:20           ` Rick Jones
2001-01-18 19:45             ` Andi Kleen
2001-01-18 20:30             ` kuznet
2001-01-18 20:50               ` Ingo Molnar
2001-01-18 22:49               ` Rick Jones
2001-01-18 13:29         ` Ingo Molnar
2001-01-18 16:51           ` Linus Torvalds
2001-01-18 17:04             ` Ingo Molnar
2001-01-17 21:51 Dan Kegel
  -- strict thread matches above, loose matches on Subject: below --
2001-01-24  0:19 Cacophonix

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=20010119221327.C8717@athlon.random \
    --to=andrea@suse.de \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=raj@cup.hp.com \
    --cc=torvalds@transmeta.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