[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061106145757.8f59caa8.akpm@osdl.org>
Date: Mon, 6 Nov 2006 14:57:57 -0800
From: Andrew Morton <akpm@...l.org>
To: David Miller <davem@...emloft.net>
Cc: linux-kernel@...r.kernel.org, acme@...ectiva.com.br
Subject: Re: + net-uninline-skb_put.patch added to -mm tree
On Mon, 06 Nov 2006 14:42:33 -0800 (PST)
David Miller <davem@...emloft.net> wrote:
> From: akpm@...l.org
> Date: Fri, 03 Nov 2006 14:18:29 -0800
>
> > Subject: net: uninline skb_put()
> > From: Andrew Morton <akpm@...l.org>
> >
> > It has 34 callsites for a total of 2650 bytes.
> >
> > Cc: Arnaldo Carvalho de Melo <acme@...ectiva.com.br>
> > Signed-off-by: Andrew Morton <akpm@...l.org>
>
> A more accurate figure would probably be:
>
> davem@...set:~/src/GIT/net-2.6$ git grep skb_put | grep -v __skb_put | wc -l
> 1167
>
> :-)
True. I'm not sure what .config Arnaldo was using..
> Half of the cost of this interface are the assertions, which while
> useful are obviously over the top for such an oft-used routine in
> packet processing.
>
> Without the assertion checks it's merely:
>
> unsigned char *tmp = skb->tail;
> skb->tail += len;
> skb->len += len;
> return tmp;
>
> And even with 1167 call sites that is definitely something which
> should be inlined.
Yes.
Tricky. I guess one suitable approach would be to create a standalone
skb-debugging config option. There's quite a lot of debug stuff in there
which could be made conditional on that option.
But otoh, skb-debugging finds bugs.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists