From: Joe Perches <joe@perches.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Jiri Pirko <jpirko@redhat.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] net: deinline netif_tx_stop_queue() and netif_tx_stop_all_queues()
Date: Thu, 07 May 2015 11:44:37 -0700 [thread overview]
Message-ID: <1431024277.18597.11.camel@perches.com> (raw)
In-Reply-To: <554B9D82.80101@gmail.com>
On Thu, 2015-05-07 at 10:14 -0700, Alexander Duyck wrote:
> On 05/07/2015 04:41 AM, Denys Vlasenko wrote:
> > These functions compile to ~60 bytes of machine code each.
> >
> > With this .config: http://busybox.net/~vda/kernel_config
> > there are 617 calls to netif_tx_stop_queue()
> > and 49 calls to netif_tx_stop_all_queues() in vmlinux.
> >
> > Code size is reduced by 27 kbytes:
[]
> This is the WARN_ON action. One thing you might try doing is moving
> this to a function of its own instead of moving the entire thing out of
> being an inline. You may find you still get most of the space savings
> as I wonder if the string for the printk isn't being duplicated for each
> caller.
It is effectively duplicated (with different prefixes) if there is a
#define pr_fmt(fmt) "some_prefix: " fmt
before this code is reached. That's most callers now.
The code that doesn't have a pr_fmt should get symbol deduplicated
at link time.
next prev parent reply other threads:[~2015-05-07 18:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 11:41 [PATCH] net: deinline netif_tx_stop_queue() and netif_tx_stop_all_queues() Denys Vlasenko
2015-05-07 17:14 ` Alexander Duyck
2015-05-07 18:44 ` Joe Perches [this message]
2015-05-08 9:45 ` Denys Vlasenko
2015-05-08 15:50 ` Alexander Duyck
2015-05-08 17:30 ` Alexei Starovoitov
2015-05-10 2:27 ` David Miller
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=1431024277.18597.11.camel@perches.com \
--to=joe@perches.com \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=dvlasenk@redhat.com \
--cc=jpirko@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.