summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2008-06-19 17:04:14 +0200
committerTobias Klauser <tklauser@xenon.tklauser.home>2008-06-19 17:04:14 +0200
commitc28829f119a0f531a3f126e434dd385b7bb23548 (patch)
tree4cff0e5d2d1e0bf9eddb8471595546528381b78e /inotail.c
parentbf475dea9e158e8af1a7765bb48e5d49d4cca731 (diff)
parent164d300c2d4d88f2bd787a0c56dc34b3ebb47073 (diff)
Merge branch 'master' into followname
Conflicts: inotail.c
Diffstat (limited to 'inotail.c')
-rw-r--r--inotail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/inotail.c b/inotail.c
index 8c161e9..b61e30a 100644
--- a/inotail.c
+++ b/inotail.c
@@ -69,7 +69,7 @@ static const struct option long_opts[] = {
{ NULL, 0, NULL, 0 }
};
-static void *emalloc(size_t size)
+static void *emalloc(const size_t size)
{
void *ret = malloc(size);
@@ -747,7 +747,7 @@ int main(int argc, char **argv)
int i, c, ret = 0;
int n_files;
unsigned long n_units = DEFAULT_N_LINES;
- enum tail_mode mode = M_LINES;
+ char mode = M_LINES;
char forever = 0;
char **filenames;
struct file_struct *files = NULL;
-t TCP_STREAM -H remote -l 90 &); sleep 60 ; grep TCP /proc/net/protocols TCPv6 1880 2 20567 no 208 yes ipv6 y y y y y y y y y y y y y n y y y y y TCP 1696 508 20567 no 208 yes kernel y y y y y y y y y y y y y n y y y y y Using 128KB has no bad effect on the throughput or cpu usage of a single flow, although there is an increase of context switches. A bonus is that we hold socket lock for a shorter amount of time and should improve latencies of ACK processing. lpq83:~# echo -1 >/proc/sys/net/ipv4/tcp_notsent_lowat lpq83:~# perf stat -e context-switches ./netperf -H 7.7.7.84 -t omni -l 20 -c -i10,3 OMNI Send TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 7.7.7.84 () port 0 AF_INET : +/-2.500% @ 99% conf. Local Remote Local Elapsed Throughput Throughput Local Local Remote Remote Local Remote Service Send Socket Recv Socket Send Time Units CPU CPU CPU CPU Service Service Demand Size Size Size (sec) Util Util Util Util Demand Demand Units Final Final % Method % Method 1651584 6291456 16384 20.00 17447.90 10^6bits/s 3.13 S -1.00 U 0.353 -1.000 usec/KB Performance counter stats for './netperf -H 7.7.7.84 -t omni -l 20 -c -i10,3': 412,514 context-switches 200.034645535 seconds time elapsed lpq83:~# echo 131072 >/proc/sys/net/ipv4/tcp_notsent_lowat lpq83:~# perf stat -e context-switches ./netperf -H 7.7.7.84 -t omni -l 20 -c -i10,3 OMNI Send TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 7.7.7.84 () port 0 AF_INET : +/-2.500% @ 99% conf. Local Remote Local Elapsed Throughput Throughput Local Local Remote Remote Local Remote Service Send Socket Recv Socket Send Time Units CPU CPU CPU CPU Service Service Demand Size Size Size (sec) Util Util Util Util Demand Demand Units Final Final % Method % Method 1593240 6291456 16384 20.00 17321.16 10^6bits/s 3.35 S -1.00 U 0.381 -1.000 usec/KB Performance counter stats for './netperf -H 7.7.7.84 -t omni -l 20 -c -i10,3': 2,675,818 context-switches 200.029651391 seconds time elapsed Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Neal Cardwell <ncardwell@google.com> Cc: Yuchung Cheng <ycheng@google.com> Acked-By: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/tcp.h')