All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [meta-virtualization][PATCH] openvswitch: Enable LTO
       [not found] <20200325054222.387399-1-raj.khem@gmail.com>
@ 2020-03-25 12:53 ` Bruce Ashfield
       [not found]   ` <CAMKF1sqYD1gw3qcw+edGawBZZWPz=qyGyHqrgY5xu1E94wcEkA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2020-03-25 12:53 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-virtualization

On Wed, Mar 25, 2020 at 1:42 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> openvswitch binaries can shed some size with lto
>
> --- a/packages/rdk-linux-gnueabi/openvswitch/openvswitch-ovsdb/files-in-package.txt
> +++ b/packages/rdk-linux-gnueabi/openvswitch/openvswitch-ovsdb/files-in-package.txt
> @@ -1,7 +1,7 @@
> drwxr-xr-x root       root             3488 ./usr
> drwxr-xr-x root       root             3488 ./usr/bin
> --rwxr-xr-x root       root           378984 ./usr/bin/ovsdb-client
> --rwxr-xr-x root       root           353628 ./usr/bin/ovsdb-tool
> --rwxr-xr-x root       root          1411216 ./usr/bin/ovs-vsctl
> +-rwxr-xr-x root       root           203356 ./usr/bin/ovsdb-client
> +-rwxr-xr-x root       root           233172 ./usr/bin/ovsdb-tool
> +-rwxr-xr-x root       root           287012 ./usr/bin/ovs-vsctl
> drwxr-xr-x root       root             3488 ./usr/sbin
> --rwxr-xr-x root       root           379404 ./usr/sbin/ovsdb-server
> +-rwxr-xr-x root       root           287672 ./usr/sbin/ovsdb-server
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
> ---
>  recipes-networking/openvswitch/openvswitch_git.bb | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
> index 07258be..bd74f49 100644
> --- a/recipes-networking/openvswitch/openvswitch_git.bb
> +++ b/recipes-networking/openvswitch/openvswitch_git.bb
> @@ -37,6 +37,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"
>
>  DPDK_INSTALL_DIR ?= "/opt/dpdk"
>
> +CFLAGS += "-flto"
> +LDFLAGS += "-flto"

Shouldn't this be something that is configurable ? I know that I want
it to be. i.e. isn't there some sort of distro feature that we can use
to enable or disable this by default ?

Bruce

> +
>  PACKAGECONFIG ?= "libcap-ng"
>  PACKAGECONFIG[dpdk] = "--with-dpdk=${STAGING_DIR_TARGET}${DPDK_INSTALL_DIR}/share/${TARGET_ARCH}-native-linuxapp-gcc,,dpdk,dpdk"
>  PACKAGECONFIG[libcap-ng] = "--enable-libcapng,--disable-libcapng,libcap-ng,"
> --
> 2.26.0
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-virtualization][PATCH] openvswitch: Enable LTO
       [not found]   ` <CAMKF1sqYD1gw3qcw+edGawBZZWPz=qyGyHqrgY5xu1E94wcEkA@mail.gmail.com>
@ 2020-03-25 15:10     ` Bruce Ashfield
       [not found]       ` <CAMKF1soSqYqHJCYerw0AUqiO0Z0bCi2-bfHyfgyCFp3JRO16xw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2020-03-25 15:10 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-virtualization

On Wed, Mar 25, 2020 at 9:47 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Wed, Mar 25, 2020 at 5:53 AM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> >
> > On Wed, Mar 25, 2020 at 1:42 AM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > openvswitch binaries can shed some size with lto
> > >
> > > --- a/packages/rdk-linux-gnueabi/openvswitch/openvswitch-ovsdb/files-in-package.txt
> > > +++ b/packages/rdk-linux-gnueabi/openvswitch/openvswitch-ovsdb/files-in-package.txt
> > > @@ -1,7 +1,7 @@
> > > drwxr-xr-x root       root             3488 ./usr
> > > drwxr-xr-x root       root             3488 ./usr/bin
> > > --rwxr-xr-x root       root           378984 ./usr/bin/ovsdb-client
> > > --rwxr-xr-x root       root           353628 ./usr/bin/ovsdb-tool
> > > --rwxr-xr-x root       root          1411216 ./usr/bin/ovs-vsctl
> > > +-rwxr-xr-x root       root           203356 ./usr/bin/ovsdb-client
> > > +-rwxr-xr-x root       root           233172 ./usr/bin/ovsdb-tool
> > > +-rwxr-xr-x root       root           287012 ./usr/bin/ovs-vsctl
> > > drwxr-xr-x root       root             3488 ./usr/sbin
> > > --rwxr-xr-x root       root           379404 ./usr/sbin/ovsdb-server
> > > +-rwxr-xr-x root       root           287672 ./usr/sbin/ovsdb-server
> > >
> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
> > > ---
> > >  recipes-networking/openvswitch/openvswitch_git.bb | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
> > > index 07258be..bd74f49 100644
> > > --- a/recipes-networking/openvswitch/openvswitch_git.bb
> > > +++ b/recipes-networking/openvswitch/openvswitch_git.bb
> > > @@ -37,6 +37,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"
> > >
> > >  DPDK_INSTALL_DIR ?= "/opt/dpdk"
> > >
> > > +CFLAGS += "-flto"
> > > +LDFLAGS += "-flto"
> >
> > Shouldn't this be something that is configurable ? I know that I want
> > it to be. i.e. isn't there some sort of distro feature that we can use
> > to enable or disable this by default ?
> >
>
> yes distro feature is coming I will  turn this into DISTRO feature too
> but in this case benefits are regardless

.... but nothing is bug free, there are documented cases of LTO
causing issues. So until we get a distro knob to turn this off an on,
what about something like ?

CFLAGS_LTO ?= "-flto"
LDFLAGS_LTO ?= "-flto"

CFLAGS += "${CFLAGS_LTO}"
LDFLAGS += "${LDFLAGS_LTO}"

So if we run into issues, we can easily bappend the LTO flags to nothing.

Bruce

>
> > Bruce
> >
> > > +
> > >  PACKAGECONFIG ?= "libcap-ng"
> > >  PACKAGECONFIG[dpdk] = "--with-dpdk=${STAGING_DIR_TARGET}${DPDK_INSTALL_DIR}/share/${TARGET_ARCH}-native-linuxapp-gcc,,dpdk,dpdk"
> > >  PACKAGECONFIG[libcap-ng] = "--enable-libcapng,--disable-libcapng,libcap-ng,"
> > > --
> > > 2.26.0
> > >
> >
> >
> > --
> > - Thou shalt not follow the NULL pointer, for chaos and madness await
> > thee at its end
> > - "Use the force Harry" - Gandalf, Star Trek II



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-virtualization][PATCH] openvswitch: Enable LTO
       [not found]       ` <CAMKF1soSqYqHJCYerw0AUqiO0Z0bCi2-bfHyfgyCFp3JRO16xw@mail.gmail.com>
@ 2020-03-25 16:46         ` Bruce Ashfield
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2020-03-25 16:46 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-virtualization

On Wed, Mar 25, 2020 at 12:30 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> Sounds good to me. Let me first add lto as distro knob so hold on to it
>

ok! No worries, I'll wait on a new patch from you.

Cheers,

Bruce

> On Wed, Mar 25, 2020 at 8:10 AM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>>
>> On Wed, Mar 25, 2020 at 9:47 AM Khem Raj <raj.khem@gmail.com> wrote:
>> >
>> > On Wed, Mar 25, 2020 at 5:53 AM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>> > >
>> > > On Wed, Mar 25, 2020 at 1:42 AM Khem Raj <raj.khem@gmail.com> wrote:
>> > > >
>> > > > openvswitch binaries can shed some size with lto
>> > > >
>> > > > --- a/packages/rdk-linux-gnueabi/openvswitch/openvswitch-ovsdb/files-in-package.txt
>> > > > +++ b/packages/rdk-linux-gnueabi/openvswitch/openvswitch-ovsdb/files-in-package.txt
>> > > > @@ -1,7 +1,7 @@
>> > > > drwxr-xr-x root       root             3488 ./usr
>> > > > drwxr-xr-x root       root             3488 ./usr/bin
>> > > > --rwxr-xr-x root       root           378984 ./usr/bin/ovsdb-client
>> > > > --rwxr-xr-x root       root           353628 ./usr/bin/ovsdb-tool
>> > > > --rwxr-xr-x root       root          1411216 ./usr/bin/ovs-vsctl
>> > > > +-rwxr-xr-x root       root           203356 ./usr/bin/ovsdb-client
>> > > > +-rwxr-xr-x root       root           233172 ./usr/bin/ovsdb-tool
>> > > > +-rwxr-xr-x root       root           287012 ./usr/bin/ovs-vsctl
>> > > > drwxr-xr-x root       root             3488 ./usr/sbin
>> > > > --rwxr-xr-x root       root           379404 ./usr/sbin/ovsdb-server
>> > > > +-rwxr-xr-x root       root           287672 ./usr/sbin/ovsdb-server
>> > > >
>> > > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > > > Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
>> > > > ---
>> > > >  recipes-networking/openvswitch/openvswitch_git.bb | 3 +++
>> > > >  1 file changed, 3 insertions(+)
>> > > >
>> > > > diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
>> > > > index 07258be..bd74f49 100644
>> > > > --- a/recipes-networking/openvswitch/openvswitch_git.bb
>> > > > +++ b/recipes-networking/openvswitch/openvswitch_git.bb
>> > > > @@ -37,6 +37,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"
>> > > >
>> > > >  DPDK_INSTALL_DIR ?= "/opt/dpdk"
>> > > >
>> > > > +CFLAGS += "-flto"
>> > > > +LDFLAGS += "-flto"
>> > >
>> > > Shouldn't this be something that is configurable ? I know that I want
>> > > it to be. i.e. isn't there some sort of distro feature that we can use
>> > > to enable or disable this by default ?
>> > >
>> >
>> > yes distro feature is coming I will  turn this into DISTRO feature too
>> > but in this case benefits are regardless
>>
>> .... but nothing is bug free, there are documented cases of LTO
>> causing issues. So until we get a distro knob to turn this off an on,
>> what about something like ?
>>
>> CFLAGS_LTO ?= "-flto"
>> LDFLAGS_LTO ?= "-flto"
>>
>> CFLAGS += "${CFLAGS_LTO}"
>> LDFLAGS += "${LDFLAGS_LTO}"
>>
>> So if we run into issues, we can easily bappend the LTO flags to nothing.
>>
>> Bruce
>>
>> >
>> > > Bruce
>> > >
>> > > > +
>> > > >  PACKAGECONFIG ?= "libcap-ng"
>> > > >  PACKAGECONFIG[dpdk] = "--with-dpdk=${STAGING_DIR_TARGET}${DPDK_INSTALL_DIR}/share/${TARGET_ARCH}-native-linuxapp-gcc,,dpdk,dpdk"
>> > > >  PACKAGECONFIG[libcap-ng] = "--enable-libcapng,--disable-libcapng,libcap-ng,"
>> > > > --
>> > > > 2.26.0
>> > > >
>> > >
>> > >
>> > > --
>> > > - Thou shalt not follow the NULL pointer, for chaos and madness await
>> > > thee at its end
>> > > - "Use the force Harry" - Gandalf, Star Trek II
>>
>>
>>
>> --
>> - Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end
>> - "Use the force Harry" - Gandalf, Star Trek II



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-25 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200325054222.387399-1-raj.khem@gmail.com>
2020-03-25 12:53 ` [meta-virtualization][PATCH] openvswitch: Enable LTO Bruce Ashfield
     [not found]   ` <CAMKF1sqYD1gw3qcw+edGawBZZWPz=qyGyHqrgY5xu1E94wcEkA@mail.gmail.com>
2020-03-25 15:10     ` Bruce Ashfield
     [not found]       ` <CAMKF1soSqYqHJCYerw0AUqiO0Z0bCi2-bfHyfgyCFp3JRO16xw@mail.gmail.com>
2020-03-25 16:46         ` Bruce Ashfield

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.