diff mbox series

[ovs-dev,ovs,v3] Documentation: Adding note about using the jemalloc library.

Message ID 20240205012454.28489-1-roberto.acosta@luizalabs.com
State Superseded
Delegated to: Eelco Chaudron
Headers show
Series [ovs-dev,ovs,v3] Documentation: Adding note about using the jemalloc library. | expand

Checks

Context Check Description
ovsrobot/apply-robot fail apply and check: fail
ovsrobot/intel-ovs-compilation fail test: fail

Commit Message

Roberto Bartzen Acosta Feb. 5, 2024, 1:24 a.m. UTC
Updating the reference documentation with the inclusion of possible building
problems with libjemalloc and solution suggestions.

Reported-at: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/2015748
Signed-off-by: Roberto Bartzen Acosta <roberto.acosta@luizalabs.com>
---
 Documentation/intro/install/general.rst | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

0-day Robot Feb. 5, 2024, 1:36 a.m. UTC | #1
Bleep bloop.  Greetings Roberto Bartzen Acosta, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


git-am:
error: sha1 information is lacking or useless (Documentation/intro/install/general.rst).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Documentation: Adding note about using the jemalloc library.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Patch skipped due to previous failure.

Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
Eelco Chaudron Feb. 5, 2024, 7:32 a.m. UTC | #2
On 5 Feb 2024, at 2:24, Roberto Bartzen Acosta via dev wrote:

> Updating the reference documentation with the inclusion of possible building
> problems with libjemalloc and solution suggestions.
>
> Reported-at: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/2015748
> Signed-off-by: Roberto Bartzen Acosta <roberto.acosta@luizalabs.com>
> ---
>  Documentation/intro/install/general.rst | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst
> index ab6209482..eeb55075c 100644
> --- a/Documentation/intro/install/general.rst
> +++ b/Documentation/intro/install/general.rst
> @@ -308,6 +308,22 @@ you wish to link with jemalloc add it to LIBS::
>
>      $ ./configure LIBS=-ljemalloc
>
> +.. note::
> +  Linking Open vSwitch with the jemalloc shared library may not work as
> +  expected in certain operating system development environments. You can
> +  override the automatic compiler decision to avoid possible linker issues by
> +  passing ``-fno-lto`` or ``-fno-builtin`` flag since the jemalloc override
> +  standard built-in memory allocation functions such as malloc, calloc, etc.
> +  Both options can solve possible jemalloc linker issues with pros and cons for
> +  each case, feel free to choose the path that appears best to you. Disabling
> +  LTO flag example::
> +
> +      $ ./configure LIBS=-ljemalloc CFLAGS=-fno-lto
> +
> +  Disabling built-in flag example::
> +
> +      ./configure LIBS=-ljemalloc CFLAGS=-fno-builtin

Should we also include the default CFLAGS? As this option overrides all CFLAGS, so now we also remove the default “-g -O2” options.

> +
>  Example usage::
>      $ # Clone OVS repo
>      $cd /home/foo/ovs
> -- 
> 2.25.1
>
>
> -- 
>
>
>
>
> _'Esta mensagem é direcionada apenas para os endereços constantes no
> cabeçalho inicial. Se você não está listado nos endereços constantes no
> cabeçalho, pedimos-lhe que desconsidere completamente o conteúdo dessa
> mensagem e cuja cópia, encaminhamento e/ou execução das ações citadas estão
> imediatamente anuladas e proibidas'._
>
>
> * **'Apesar do Magazine Luiza tomar
> todas as precauções razoáveis para assegurar que nenhum vírus esteja
> presente nesse e-mail, a empresa não poderá aceitar a responsabilidade por
> quaisquer perdas ou danos causados por esse e-mail ou por seus anexos'.*
>
>
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Roberto Bartzen Acosta Feb. 5, 2024, 12:13 p.m. UTC | #3
Thanks for the review Eelco,

Em seg., 5 de fev. de 2024 às 04:32, Eelco Chaudron <echaudro@redhat.com>
escreveu:

>
>
> On 5 Feb 2024, at 2:24, Roberto Bartzen Acosta via dev wrote:
>
> > Updating the reference documentation with the inclusion of possible
> building
> > problems with libjemalloc and solution suggestions.
> >
> > Reported-at:
> https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/2015748
> > Signed-off-by: Roberto Bartzen Acosta <roberto.acosta@luizalabs.com>
> > ---
> >  Documentation/intro/install/general.rst | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> >
> > diff --git a/Documentation/intro/install/general.rst
> b/Documentation/intro/install/general.rst
> > index ab6209482..eeb55075c 100644
> > --- a/Documentation/intro/install/general.rst
> > +++ b/Documentation/intro/install/general.rst
> > @@ -308,6 +308,22 @@ you wish to link with jemalloc add it to LIBS::
> >
> >      $ ./configure LIBS=-ljemalloc
> >
> > +.. note::
> > +  Linking Open vSwitch with the jemalloc shared library may not work as
> > +  expected in certain operating system development environments. You can
> > +  override the automatic compiler decision to avoid possible linker
> issues by
> > +  passing ``-fno-lto`` or ``-fno-builtin`` flag since the jemalloc
> override
> > +  standard built-in memory allocation functions such as malloc, calloc,
> etc.
> > +  Both options can solve possible jemalloc linker issues with pros and
> cons for
> > +  each case, feel free to choose the path that appears best to you.
> Disabling
> > +  LTO flag example::
> > +
> > +      $ ./configure LIBS=-ljemalloc CFLAGS=-fno-lto
> > +
> > +  Disabling built-in flag example::
> > +
> > +      ./configure LIBS=-ljemalloc CFLAGS=-fno-builtin
>
> Should we also include the default CFLAGS? As this option overrides all
> CFLAGS, so now we also remove the default “-g -O2” options.
>

Sure, I took a look at the configuration examples and others also pass the
"-g -O2" in CFLAGS as your suggestion. So, I will change this and send a
new patch version.
Thanks,
Roberto


>
> > +
> >  Example usage::
> >      $ # Clone OVS repo
> >      $cd /home/foo/ovs
> > --
> > 2.25.1
> >
> >
> > --
> >
> >
> >
> >
> > _'Esta mensagem é direcionada apenas para os endereços constantes no
> > cabeçalho inicial. Se você não está listado nos endereços constantes no
> > cabeçalho, pedimos-lhe que desconsidere completamente o conteúdo dessa
> > mensagem e cuja cópia, encaminhamento e/ou execução das ações citadas
> estão
> > imediatamente anuladas e proibidas'._
> >
> >
> > * **'Apesar do Magazine Luiza tomar
> > todas as precauções razoáveis para assegurar que nenhum vírus esteja
> > presente nesse e-mail, a empresa não poderá aceitar a responsabilidade
> por
> > quaisquer perdas ou danos causados por esse e-mail ou por seus anexos'.*
> >
> >
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
diff mbox series

Patch

diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst
index ab6209482..eeb55075c 100644
--- a/Documentation/intro/install/general.rst
+++ b/Documentation/intro/install/general.rst
@@ -308,6 +308,22 @@  you wish to link with jemalloc add it to LIBS::
 
     $ ./configure LIBS=-ljemalloc
 
+.. note::
+  Linking Open vSwitch with the jemalloc shared library may not work as
+  expected in certain operating system development environments. You can
+  override the automatic compiler decision to avoid possible linker issues by
+  passing ``-fno-lto`` or ``-fno-builtin`` flag since the jemalloc override
+  standard built-in memory allocation functions such as malloc, calloc, etc.
+  Both options can solve possible jemalloc linker issues with pros and cons for
+  each case, feel free to choose the path that appears best to you. Disabling
+  LTO flag example::
+
+      $ ./configure LIBS=-ljemalloc CFLAGS=-fno-lto
+
+  Disabling built-in flag example::
+
+      ./configure LIBS=-ljemalloc CFLAGS=-fno-builtin
+
 Example usage::
     $ # Clone OVS repo
     $cd /home/foo/ovs