From: Stephen Hemminger <shemminger@osdl.org>
To: David Miller <davem@davemloft.net>
Cc: woodard@redhat.com, netdev@vger.kernel.org, mgrondona@llnl.gov,
behlendorf1@llnl.gov
Subject: Re: [PATCH] Customizable TCP backoff patch
Date: Wed, 4 Oct 2006 10:17:52 -0700 [thread overview]
Message-ID: <20061004101752.4e42e2ff@freekitty> (raw)
In-Reply-To: <20061004.000722.99203823.davem@davemloft.net>
On Wed, 04 Oct 2006 00:07:22 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Ben Woodard <woodard@redhat.com>
> Date: Tue, 03 Oct 2006 11:14:38 -0700
>
> > > Other issues:
> > >
> > > 1) 2 "u32" in the tcp_sock is a lot of space to devote to this
> > > new state. If it can fit in 2 "u16"'s or even less space,
> > > please use that.
> > >
> > > 2) the expression "(tp->foo ? : sysctl_foo)" is repeated many times
> > > in the patch, please encapsulate it into an inline function
> > > or similar
> > >
> >
> > How does this look to you for answering your two complaints above.
>
> It looks a lot better. I'd like you to take #2 further,
> put the inline function into net/tcp.h and use it in the
> tcp.c instances too.
>
> Also, please don't format code like this:
>
> +static inline __u16 rto_max(struct tcp_sock *tp){
> + return tp->rto_max ? : sysctl_tcp_rto_max;
> +}
> +
> +static inline __u16 rto_init(struct tcp_sock *tp){
> + return tp->rto_init ? : sysctl_tcp_rto_init;
> +}
>
> The openning brace of each functions belongs on a line by itself,
> thanks.
>
> Finally, I'm not so sure "seconds" is the best unit for the
> socket option. In fact you use "seconds" as the unit for
> the socket option and the sysctl is raw jiffies. That's
> inconsistency is really problematic.
>
> At the very least, seconds might not be fine enough granularity
> for some circumstances. Heck, the default RTO_MIN is 1/5 of a
> second. :-)
>
> I also understand that going to milliseconds or microseconds would
> make the size of the in-socket struct members an issue again. These
> things are never easy are they? :-/
>
> Any better ideas?
If you are willing to do a little more work, the sysctl value can be
in milliseconds, and the internal socket member in some other unit
like jiffies. It does require writing your own in/out translation
instead of using proc_dointvec
--
Stephen Hemminger <shemminger@osdl.org>
next prev parent reply other threads:[~2006-10-04 17:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 18:52 [PATCH] Customizable TCP backoff patch Ben Woodard
2006-09-27 23:16 ` David Miller
2006-09-27 23:00 ` Stephen Hemminger
2006-09-28 2:06 ` David Miller
2006-10-03 18:14 ` Ben Woodard
2006-10-04 7:07 ` David Miller
2006-10-04 8:56 ` Ingo Oeser
2006-10-04 9:08 ` David Miller
2006-10-04 17:17 ` Stephen Hemminger [this message]
2006-10-11 1:46 ` Ben Woodard
2006-10-11 1:59 ` YOSHIFUJI Hideaki / 吉藤英明
2006-10-11 2:53 ` David Miller
2006-10-11 2:54 ` David Miller
2006-10-11 14:01 ` Vlad Yasevich
2006-10-12 0:51 ` Ben Woodard
2006-10-12 1:06 ` YOSHIFUJI Hideaki / 吉藤英明
2006-10-12 15:49 ` Ben Woodard
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=20061004101752.4e42e2ff@freekitty \
--to=shemminger@osdl.org \
--cc=behlendorf1@llnl.gov \
--cc=davem@davemloft.net \
--cc=mgrondona@llnl.gov \
--cc=netdev@vger.kernel.org \
--cc=woodard@redhat.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;
as well as URLs for NNTP newsgroup(s).