Welcome! Log In Create A New Profile

Advanced

Re: [Patch] nginx to use libatomic_ops

All files from this thread

File Name File Size   Posted by Date  
nginx-0.8.16-libatomic.patch 3.9 KB open | download W-Mark Kubacki 10/09/2009 Read message
September 29, 2009 04:26AM
On Fri, Sep 25, 2009 at 09:46:33PM +0200, W-Mark Kubacki wrote:

> Dear developers,
>
> I have experienced SEGFAULTs on ARM using fastcgi and discovered it
> compiles with "NGX_HAVE_ATOMIC_OPS 0" on 'other' architectures than
> x86, amd64, sparc and the such defined in src/os/unix/ngx_atomic.h.
>
> Therefore I'd like to contribute the patch linked below [1], which
> introduces configure option "--with-libatomic" and which makes nginx
> use atomic operations of that library on these 'other' architectures.
> For more information on the library please see [2]. (Indeed, this does
> not result in additional runtime dependencies and the atomic ops
> compile to less code than those of newer GCC versions [3].)
>
> --with-libatomic compiles on ARM, does no SEGFAULT, and yields higher
> requests per second than with the otherwise used lock file.
>
> The option is disabled by default, and even if enabled still used as
> last resort. I hope that after a brief review (I have little
> experience with configure scripts) you can integrate it in the next
> release.
>
> --
> W-Mark Kubacki
> http://mark.ossdl.de/
>
> [1] https://svn.hurrikane.de/all/ossdl/www-servers/nginx/files/nginx-0.8.16-libatomic.patch
> [2] http://www.hpl.hp.com/research/linux/atomic_ops/
> http://bdwgc.cvs.sourceforge.net/viewvc/bdwgc/bdwgc/libatomic_ops-1.2/
> [3] http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
> for gcc 4.1.0 and later

Thank you for the patch and information about gcc 4.1.
I'm going to add gcc builtins, since they are slighty lesser than
my code at least on x86.
I'm not sure should libatomic be added, since gcc 4.1+ is common compiler
these days.
Could you show backtrace of the segfault ? I could not reproduce it
on x86 with disabled atomic ops.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

[Patch] nginx to use libatomic_ops

W-Mark Kubacki September 25, 2009 03:52PM

Re: [Patch] nginx to use libatomic_ops

Igor Sysoev September 29, 2009 04:26AM

Re: [Patch] nginx to use libatomic_ops

W-Mark Kubacki September 29, 2009 06:32AM

Re: [Patch] nginx to use libatomic_ops

Igor Sysoev October 08, 2009 11:50AM

Re: [Patch] nginx to use libatomic_ops Attachments

W-Mark Kubacki October 09, 2009 06:04AM

Re: [Patch] nginx to use libatomic_ops

Maxim Dounin October 09, 2009 07:28AM

Re: [Patch] nginx to use libatomic_ops

Igor Sysoev October 09, 2009 09:08AM

Re: [Patch] nginx to use libatomic_ops

Maxim Dounin October 11, 2009 09:00PM

Re: [Patch] nginx to use libatomic_ops

W-Mark Kubacki October 12, 2009 07:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 279
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready