* [PATCH] rearrange frto field to save space. [not found] <20040420155738.4146b5bb.davem@redhat.com> @ 2004-04-21 18:10 ` Stephen Hemminger 2004-04-21 23:59 ` David S. Miller 2004-04-22 0:15 ` Joe Perches 2004-04-21 18:10 ` [PATCH] add sysctl to turn off caching metrics Stephen Hemminger 1 sibling, 2 replies; 6+ messages in thread From: Stephen Hemminger @ 2004-04-21 18:10 UTC (permalink / raw) To: David S. Miller; +Cc: netdev Since the frto_counter field only goes from 0 to 4, it can be moved into a unused byte size hole to save space. diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h --- a/include/linux/tcp.h Wed Apr 21 10:39:07 2004 +++ b/include/linux/tcp.h Wed Apr 21 10:39:07 2004 @@ -255,6 +255,10 @@ __u8 retransmits; /* Number of unrecovered RTO timeouts. */ __u8 reordering; /* Packet reordering metric. */ + __u8 frto_counter; /* Number of new acks after RTO */ + __u32 frto_highmark; /* snd_nxt when RTO occurred */ + + __u8 unused_pad; __u8 queue_shrunk; /* Write queue has been shrunk recently.*/ __u8 defer_accept; /* User waits for some data after accept() */ @@ -369,9 +373,6 @@ unsigned int keepalive_time; /* time before keep alive takes place */ unsigned int keepalive_intvl; /* time interval between keep alive probes */ int linger2; - - int frto_counter; /* Number of new acks after RTO */ - __u32 frto_highmark; /* snd_nxt when RTO occurred */ unsigned long last_synq_overflow; ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rearrange frto field to save space. 2004-04-21 18:10 ` [PATCH] rearrange frto field to save space Stephen Hemminger @ 2004-04-21 23:59 ` David S. Miller 2004-04-22 0:15 ` Joe Perches 1 sibling, 0 replies; 6+ messages in thread From: David S. Miller @ 2004-04-21 23:59 UTC (permalink / raw) To: Stephen Hemminger; +Cc: netdev On Wed, 21 Apr 2004 11:10:32 -0700 Stephen Hemminger <shemminger@osdl.org> wrote: > Since the frto_counter field only goes from 0 to 4, it can be moved > into a unused byte size hole to save space. Ok. Applied. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rearrange frto field to save space. 2004-04-21 18:10 ` [PATCH] rearrange frto field to save space Stephen Hemminger 2004-04-21 23:59 ` David S. Miller @ 2004-04-22 0:15 ` Joe Perches 2004-04-22 0:38 ` David S. Miller 1 sibling, 1 reply; 6+ messages in thread From: Joe Perches @ 2004-04-22 0:15 UTC (permalink / raw) To: Stephen Hemminger; +Cc: David S Miller, netdev On Wed, 2004-04-21 at 11:10, Stephen Hemminger wrote: > + __u8 unused_pad; There's no real reason that I can see to have padding here. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rearrange frto field to save space. 2004-04-22 0:15 ` Joe Perches @ 2004-04-22 0:38 ` David S. Miller 0 siblings, 0 replies; 6+ messages in thread From: David S. Miller @ 2004-04-22 0:38 UTC (permalink / raw) To: Joe Perches; +Cc: shemminger, netdev On Wed, 21 Apr 2004 17:15:12 -0700 Joe Perches <joe@perches.com> wrote: > On Wed, 2004-04-21 at 11:10, Stephen Hemminger wrote: > > + __u8 unused_pad; > > There's no real reason that I can see to have padding here. SO that the next person adding member to this struct know it exists. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] add sysctl to turn off caching metrics [not found] <20040420155738.4146b5bb.davem@redhat.com> 2004-04-21 18:10 ` [PATCH] rearrange frto field to save space Stephen Hemminger @ 2004-04-21 18:10 ` Stephen Hemminger 2004-04-22 0:01 ` David S. Miller 1 sibling, 1 reply; 6+ messages in thread From: Stephen Hemminger @ 2004-04-21 18:10 UTC (permalink / raw) To: David S. Miller; +Cc: netdev When running benchmarks and other experiments, it is often useful not to save the route metrics (cwnd, rtt) from each connection. Here is a simple way to do it with sysctl. Not a new idea, it is part of the web100 stuff as well. Patch against 2.6.6-rc2 diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h --- a/include/linux/sysctl.h Wed Apr 21 10:39:28 2004 +++ b/include/linux/sysctl.h Wed Apr 21 10:39:28 2004 @@ -326,6 +326,7 @@ NET_IPV4_IPFRAG_SECRET_INTERVAL=94, NET_TCP_WESTWOOD=95, NET_IPV4_IGMP_MAX_MSF=96, + NET_TCP_NO_METRICS_SAVE=97, }; enum { diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h Wed Apr 21 10:39:28 2004 +++ b/include/net/tcp.h Wed Apr 21 10:39:28 2004 @@ -583,6 +583,7 @@ extern int sysctl_tcp_frto; extern int sysctl_tcp_low_latency; extern int sysctl_tcp_westwood; +extern int sysctl_tcp_nometrics_save; extern atomic_t tcp_memory_allocated; extern atomic_t tcp_sockets_allocated; diff -Nru a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c --- a/net/ipv4/sysctl_net_ipv4.c Wed Apr 21 10:39:28 2004 +++ b/net/ipv4/sysctl_net_ipv4.c Wed Apr 21 10:39:28 2004 @@ -594,6 +594,14 @@ .strategy = &sysctl_jiffies }, { + .ctl_name = NET_TCP_NO_METRICS_SAVE, + .procname = "tcp_no_metrics_save", + .data = &sysctl_tcp_nometrics_save, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { .ctl_name = NET_TCP_WESTWOOD, .procname = "tcp_westwood", .data = &sysctl_tcp_westwood, @@ -601,6 +609,7 @@ .mode = 0644, .proc_handler = &proc_dointvec, }, + { .ctl_name = 0 } }; diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c Wed Apr 21 10:39:28 2004 +++ b/net/ipv4/tcp_input.c Wed Apr 21 10:39:28 2004 @@ -87,6 +87,7 @@ int sysctl_tcp_max_orphans = NR_FILE; int sysctl_tcp_frto; int sysctl_tcp_westwood; +int sysctl_tcp_nometrics_save; #define FLAG_DATA 0x01 /* Incoming frame contained data. */ #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ @@ -517,6 +518,9 @@ { struct tcp_opt *tp = tcp_sk(sk); struct dst_entry *dst = __sk_dst_get(sk); + + if (sysctl_tcp_nometrics_save) + return; dst_confirm(dst); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] add sysctl to turn off caching metrics 2004-04-21 18:10 ` [PATCH] add sysctl to turn off caching metrics Stephen Hemminger @ 2004-04-22 0:01 ` David S. Miller 0 siblings, 0 replies; 6+ messages in thread From: David S. Miller @ 2004-04-22 0:01 UTC (permalink / raw) To: Stephen Hemminger; +Cc: netdev On Wed, 21 Apr 2004 11:10:46 -0700 Stephen Hemminger <shemminger@osdl.org> wrote: > When running benchmarks and other experiments, it is often useful > not to save the route metrics (cwnd, rtt) from each connection. > Here is a simple way to do it with sysctl. Not a new idea, it is part > of the web100 stuff as well. This is fine. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-04-22 0:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20040420155738.4146b5bb.davem@redhat.com>
2004-04-21 18:10 ` [PATCH] rearrange frto field to save space Stephen Hemminger
2004-04-21 23:59 ` David S. Miller
2004-04-22 0:15 ` Joe Perches
2004-04-22 0:38 ` David S. Miller
2004-04-21 18:10 ` [PATCH] add sysctl to turn off caching metrics Stephen Hemminger
2004-04-22 0:01 ` David S. Miller
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).