[Bugs] [Bug 1236272] socket: Use newer system calls that provide better interface /performance on Linux/*BSD when available

bugzilla at redhat.com bugzilla at redhat.com
Fri Oct 12 02:12:11 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1236272

Worker Ant <bugzilla-bot at gluster.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|POST                        |MODIFIED



--- Comment #13 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/11241 committed in master by "Raghavendra G"
<rgowdapp at redhat.com> with a commit message- socket: use accept4/paccept for
nonblocking socket

This reduces the no. of syscalls on Linux systems from 2, accept(2) and
fcntl(2) for setting O_NONBLOCK, to a single accept4(2).  On NetBSD, we
have paccept(2) that does the same, if we leave signal masking aside.

Added sys_accept which accepts an extra flags argument than accept(2).
This would opportunistically use accept4/paccept as available.  It would
fallback to accept(2) and fcntl(2) otherwise.

While at this, the patch sets FD_CLOEXEC flag on the accepted socket fd.

BUG: 1236272
Change-Id: I41e43fd3e36d6dabb07e578a1cea7f45b7b4e37f
fixes: bz#1236272
Signed-off-by: Krishnan Parthasarathi <kparthas at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=wpsiDZFIPE&a=cc_unsubscribe


More information about the Bugs mailing list