Bug 1236272 - socket: Use newer system calls that provide better interface/performance on Linux/*BSD when available
Summary: socket: Use newer system calls that provide better interface/performance on L...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: transport
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Milind Changire
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-27 06:06 UTC by krishnan parthasarathi
Modified: 2019-03-25 16:30 UTC (History)
4 users (show)

Fixed In Version: glusterfs-6.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-25 16:30:11 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description krishnan parthasarathi 2015-06-27 06:06:17 UTC
Description of problem:
New system calls have been introduced in Linux/NetBSD that provide improved performance/interface. e.g accept4(2) in GNU/Linux makes it possible to set O_NONBLOCK flag on the socket fd saving an additional fcntl(2) for the same. paccept(2) provides the same functionality for NetBSD. This bug tracks the patches that make use of these newer interfaces without breaking compatibility with systems running older kernels.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2015-06-27 06:07:02 UTC
REVIEW: http://review.gluster.org/11304 (socket: set FD_CLOEXEC on all sockets) posted (#3) for review on master by Krishnan Parthasarathi (kparthas@redhat.com)

Comment 2 Anand Avati 2015-07-04 04:06:57 UTC
REVIEW: http://review.gluster.org/11241 (socket: use accept4/paccept for nonblocking sockets) posted (#7) for review on master by Krishnan Parthasarathi (kparthas@redhat.com)

Comment 3 Anand Avati 2015-07-27 04:54:24 UTC
REVIEW: http://review.gluster.org/11241 (socket: use accept4/paccept for nonblocking sockets) posted (#9) for review on master by Krishnan Parthasarathi (kparthas@redhat.com)

Comment 6 Mike McCune 2016-03-28 23:43:17 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions

Comment 7 Amar Tumballi 2018-10-08 10:03:56 UTC
Not sure if it makes sense, but good to take this to closure! Marking it back to 'assigned' as the patch is abandon'd.

Comment 8 Milind Changire 2018-10-08 17:00:16 UTC
The accept path is definitely not a performance problem without this fix. So there's not much incentive to get this done.

Gluster client connections are expected to be few and long lived.

I'd want Raghavendra to comment on this as well.

Comment 9 Raghavendra G 2018-10-09 02:04:06 UTC
Yes. This is not much of a concern ATM. But if the patch is available and can be closed off quickly, makes sense to merge it. @Milind, can you please review the patch once?

Comment 10 Worker Ant 2018-10-09 05:49:58 UTC
REVIEW: https://review.gluster.org/11304 (socket: set FD_CLOEXEC on all sockets) posted (#4) for review on master by Milind Changire

Comment 11 Worker Ant 2018-10-11 05:16:09 UTC
COMMIT: https://review.gluster.org/11304 committed in master by "Raghavendra G" <rgowdapp@redhat.com> with a commit message- socket: set FD_CLOEXEC on all sockets

For more information, see http://udrepper.livejournal.com/20407.html

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

Comment 12 Worker Ant 2018-10-11 08:38:18 UTC
REVIEW: https://review.gluster.org/11241 (socket: use accept4/paccept for nonblocking socket) posted (#10) for review on master by Milind Changire

Comment 13 Worker Ant 2018-10-12 02:12:11 UTC
COMMIT: https://review.gluster.org/11241 committed in master by "Raghavendra G" <rgowdapp@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@redhat.com>

Comment 14 Shyamsundar 2019-03-25 16:30:11 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-6.0, please open a new bug report.

glusterfs-6.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2019-March/000120.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.