[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080108020529.GC16156@one.firstfloor.org>
Date: Tue, 8 Jan 2008 03:05:29 +0100
From: Andi Kleen <andi@...stfloor.org>
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, Jan 07, 2008 at 05:54:58PM -0800, David Miller wrote:
> From: Andi Kleen <andi@...stfloor.org>
> Date: Tue, 08 Jan 2008 01:23:11 +0100
>
> > David Miller <davem@...emloft.net> writes:
> >
> > > Similarly I question just about any inline usage at all in *.c files
> >
> > Don't forget the .h files. Especially a lot of stuff in tcp.h should
> > be probably in some .c file and not be inline.
>
> I explicitly left them out.
>
> Most of them are abstractions of common 2 or 3 instruction
> calculations, and thus should stay inline.
Definitely not in tcp.h. It has quite a lot of very long functions, of
which very few really need to be inline: (AFAIK the only one where
it makes really sense is tcp_set_state due to constant evaluation;
although I never quite understood why the callers just didn't
call explicit functions to do these actions)
% awk ' { line++ } ; /^{/ { start = line } ; /^}/ { n++; r += line-start-2; } ; END { print r/n }' < include/net/tcp.h
9.48889
The average function length is 9 lines.
-Andi
--
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