Netdev List
 help / color / mirror / Atom feed
From: "Indan Zupancic" <indan@nul.nu>
To: "David Laight" <David.Laight@ACULAB.COM>
Cc: "Eric Dumazet" <eric.dumazet@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: RE: [RFC] net: bpf_jit: Two pass JIT and other changes
Date: Mon, 2 Apr 2012 22:03:12 +1000	[thread overview]
Message-ID: <5f98ccc12c7887af855ff44700b528af.squirrel@webmail.greenhost.nl> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B6ECF@saturn3.aculab.com>

On Mon, April 2, 2012 19:28, David Laight wrote:
>
>> 1) Sadly, gcc isn't always smart enough to inline emit_code().
>>    So turn it into a macro to force gcc to inline it. This saves
>>    about 500 bytes. Tested with gcc 4.6.0. An alternative to the
>>    macro would be to create inline emit_code1(), emit_code2() etc.
>
> Does giving it the __attribute__((always_inline)) help?
> I had to mark a load of small static functions that way
> after a minor change (possibly to the overall size)
> stopped gcc inlining everything.

I did try that first, but it didn't work for some reason. Perhaps
the kernel uses some flag that overrides it when optimising for size.
Maybe plain -Os does that already, I don't know.

Greetings,

Indan

      reply	other threads:[~2012-04-02 12:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31 12:12 [RFC] net: bpf_jit: Two pass JIT and other changes Indan Zupancic
2012-04-02  9:28 ` David Laight
2012-04-02 12:03   ` Indan Zupancic [this message]

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=5f98ccc12c7887af855ff44700b528af.squirrel@webmail.greenhost.nl \
    --to=indan@nul.nu \
    --cc=David.Laight@ACULAB.COM \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox