Re: [meta-virtualization][PATCH] openvswitch: Enable LTO
On Wed, Mar 25, 2020 at 12:30 PM Khem Raj 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 > wrote: >> >> On Wed, Mar 25, 2020 at 9:47 AM Khem Raj wrote: >> > >> > On Wed, Mar 25, 2020 at 5:53 AM Bruce Ashfield >> > wrote: >> > > >> > > On Wed, Mar 25, 2020 at 1:42 AM Khem Raj 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 >> > > > Cc: Bruce Ashfield >> > > > --- >> > > > 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 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#5236): https://lists.yoctoproject.org/g/meta-virtualization/message/5236 Mute This Topic: https://lists.yoctoproject.org/mt/72539664/21656 Group Owner: meta-virtualization+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [meta-virtualization][PATCH] openvswitch: Enable LTO
On Wed, Mar 25, 2020 at 9:47 AM Khem Raj wrote: > > On Wed, Mar 25, 2020 at 5:53 AM Bruce Ashfield > wrote: > > > > On Wed, Mar 25, 2020 at 1:42 AM Khem Raj 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 > > > Cc: Bruce Ashfield > > > --- > > > 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 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#5235): https://lists.yoctoproject.org/g/meta-virtualization/message/5235 Mute This Topic: https://lists.yoctoproject.org/mt/72539664/21656 Group Owner: meta-virtualization+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [meta-virtualization][PATCH] openvswitch: Enable LTO
On Wed, Mar 25, 2020 at 1:42 AM Khem Raj 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 > Cc: Bruce Ashfield > --- > 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 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#5232): https://lists.yoctoproject.org/g/meta-virtualization/message/5232 Mute This Topic: https://lists.yoctoproject.org/mt/72539664/21656 Group Owner: meta-virtualization+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-