From: Andrea Arcangeli <andrea@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Ingo Molnar <mingo@elte.hu>, Rick Jones <raj@cup.hp.com>,
linux-kernel@vger.kernel.org
Subject: Re: [Fwd: [Fwd: Is sendfile all that sexy? (fwd)]]
Date: Thu, 18 Jan 2001 20:38:02 +0100 [thread overview]
Message-ID: <20010118203802.D28276@athlon.random> (raw)
In-Reply-To: <Pine.LNX.4.30.0101181411530.823-100000@elte.hu> <Pine.LNX.4.10.10101180826370.18072-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.10.10101180826370.18072-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Thu, Jan 18, 2001 at 08:49:38AM -0800
On Thu, Jan 18, 2001 at 08:49:38AM -0800, Linus Torvalds wrote:
> state. However, the fact is that you _need_ the persistency of a socket
> option if you want to take advantage of external programs etc getting good
> behaviour without having to know that they are talking to a socket.
I'm all for TCP_CORK but it has the disavantage of two syscalls for doing the
flush of the outgoing queue to the network. And one of those two syscalls is
spurious. Certainly it makes perfect sense that the uncork flushes the outgoing
queue, but I think we should have a way to flush it without exiting the cork-mode.
I believe most software only needs to SIOCPUSH after sending the data and just
before waiting the reply.
A new ioctl on the socket should be able to do that (and ioctl looks ligther
than a setsockopt, ok ignoring actually the VFS is grabbing the big lock
until we relase it in sock_ioctl, ugly, but I feel good ignoring this fact as
it will gets fixed eventually and this is userspace API that will stay longer).
[ I ignored the ioctl #define mess so it can't compile ]
diff -urN -X /home/andrea/bin/dontdiff 2.4.1pre8/net/ipv4/tcp.c SIOCPUSH/net/ipv4/tcp.c
--- 2.4.1pre8/net/ipv4/tcp.c Wed Jan 17 04:02:38 2001
+++ SIOCPUSH/net/ipv4/tcp.c Thu Jan 18 19:10:14 2001
@@ -671,6 +671,11 @@
else
answ = tp->write_seq - tp->snd_una;
break;
+ case SIOCPUSH:
+ lock_sock(sk);
+ __tcp_push_pending_frames(sk, tp, tcp_current_mss(sk), 1);
+ release_sock(sk);
+ break;
default:
return(-ENOIOCTLCMD);
};
The SIOCPUSH makes sense and it "may" be useful also when not using TCP_CORK
(only with nagle algorithm): it allows the sender to push into the network the
last frame of the message into the wire without waiting the not yet
acknowledged data to be acknowledged (and without having to disable the nagle
algorithm on the socket to achieve that).
SIOCPUSH is a noop if the user set TCP_NODELAY in the socket options indeed.
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/
next prev parent reply other threads:[~2001-01-18 19:43 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 [this message]
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
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=20010118203802.D28276@athlon.random \
--to=andrea@suse.de \
--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