From: David Miller <davem@davemloft.net>
To: torvalds@linux-foundation.org
Cc: heiko.carstens@de.ibm.com, akpm@linux-foundation.org,
a.p.zijlstra@chello.nl, mingo@elte.hu,
linux-arch@vger.kernel.org, schwidefsky@de.ibm.com,
arnd@arndb.de, horsth@linux.vnet.ibm.com,
ehrhardt@linux.vnet.ibm.com
Subject: Re: [patch 0/3] Allow inlined spinlocks again V3
Date: Fri, 14 Aug 2009 13:19:00 -0700 (PDT) [thread overview]
Message-ID: <20090814.131900.229343660.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LFD.2.01.0908141105230.3162@localhost.localdomain>
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Fri, 14 Aug 2009 11:08:16 -0700 (PDT)
> On Fri, 14 Aug 2009, Heiko Carstens wrote:
>>
>> However quite a few of the additional function calls in networking code
>> come from uninlining:
>>
>> c2aa270a [NET]: uninline skb_push, de-bloats a lot
>> 6be8ac2f [NET]: uninline skb_pull, de-bloats a lot
>> 419ae74e [NET]: uninline skb_trim, de-bloats
>
> Hmm. Those functions are big only because of the stupid debugging, which
> is almost certainly not worth it any more. I doubt people have seen enough
> skb under/over-flows in the last years to merit the code.
We have found a few bugs in the past year or two because of
the check, but indeed not "a lot".
> I suspect we should remove the silly skb_under/over_panic functions, and
> do
>
> - skb_put:
> - if (unlikely(skb->tail > skb->end))
> - skb_over_panic(skb, len, __builtin_return_address(0));
> + BUG_ON(skb->tail > skb->end);
>
> - skb_push:
> - if (unlikely(skb->data<skb->head))
> - skb_under_panic(skb, len, __builtin_return_address(0));
> + BUG_ON(skb->data < skb->head);
>
> at which point it might be worthwhile to inline them again, because the
> footprint of a BUG_ON() is really fairly small.
Maybe. Although most people turn on verbose BUG's and that
expands to the same if not more code than what's there now
in these SKB inlines.
next prev parent reply other threads:[~2009-08-14 20:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-12 18:39 [patch 0/3] Allow inlined spinlocks again V3 Heiko Carstens
2009-08-12 18:39 ` [patch 1/3] spinlock: move spinlock function bodies to header file Heiko Carstens
2009-08-12 18:39 ` [patch 2/3] spinlock: allow inlined spinlocks Heiko Carstens
2009-08-12 18:39 ` [patch 3/3] spinlock: allow inlined spinlocks on s390 Heiko Carstens
2009-08-13 18:11 ` [patch 0/3] Allow inlined spinlocks again V3 Linus Torvalds
2009-08-13 18:34 ` Ingo Molnar
2009-08-13 18:43 ` Ingo Molnar
2009-08-14 12:34 ` Heiko Carstens
2009-08-14 16:04 ` Linus Torvalds
2009-08-14 17:13 ` Heiko Carstens
2009-08-14 18:08 ` Linus Torvalds
2009-08-14 20:19 ` David Miller [this message]
2009-08-14 20:45 ` Linus Torvalds
2009-08-14 21:10 ` Linus Torvalds
2009-08-14 22:23 ` David Miller
2009-08-16 18:27 ` Heiko Carstens
2009-08-16 18:45 ` Linus Torvalds
2009-08-16 20:36 ` Ingo Molnar
2009-08-17 10:26 ` Heiko Carstens
2009-08-17 21:26 ` [numbers] Re: [patch] more skb ops inlining Ingo Molnar
2009-08-18 11:34 ` Heiko Carstens
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=20090814.131900.229343660.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=ehrhardt@linux.vnet.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=horsth@linux.vnet.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwidefsky@de.ibm.com \
--cc=torvalds@linux-foundation.org \
/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).