[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0801081228010.12911@kivilampi-30.cs.helsinki.fi>
Date: Tue, 8 Jan 2008 12:48:30 +0200 (EET)
From: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To: David Miller <davem@...emloft.net>
cc: andi@...stfloor.org, herbert@...dor.apana.org.au,
ilpo.jarvinen@...sinki.fi, netdev@...r.kernel.org, acme@...hat.com,
paul.moore@...com, latten@...ibm.com
Subject: Re: [PATCH 3/4] [XFRM]: Kill some bloat
On Mon, 7 Jan 2008, David Miller wrote:
> From: Andi Kleen <andi@...stfloor.org>
> Date: Tue, 8 Jan 2008 06:00:07 +0100
>
> > On Mon, Jan 07, 2008 at 07:37:00PM -0800, David Miller wrote:
> > > The vast majority of them are one, two, and three liners.
> >
> > % awk ' { line++ } ; /^{/ { total++; start = line } ; /^}/ { len=line-start-3; if (len > 4) l++; if (len >= 10) k++; } ; END { print total, l, l/total, k, k/total }' < include/net/tcp.h
> > 68 28 0.411765 20 0.294118
> >
> > 41% are over 4 lines, 29% are >= 10 lines.
>
> Take out the comments and whitespace lines, your script is
> too simplistic.
He should also remove these, which involve just syntactic casting to
please the compiler:
struct tcp_sock *tp = tcp_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
...and maybe some other similar ones. I'm sure that's going to make his
statistics even more questionable as is because we need tp all around.
But about his concerns, I spend couple of minutes in looking to it by
hand. These are likely to be a win:
tcp_set_state
tcp_prequeue
tcp_prequeue_init
tcp_openreq_init
...about rest I'm very unsure but there are some that probably are a
minor win as well.
tcp_dec_quickack_mode has only a single caller anyway so I'd doubt that
it's going to be significant, I thought moving it to .c earlier but
haven't just done that yet :-).
--
i.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists