[Asterisk-code-review] core: Use eventfd for alert pipes on Linux when possible (asterisk[13])
Sean Bright
asteriskteam at digium.com
Wed Apr 19 08:34:32 CDT 2017
Hello Jenkins2,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/5497
to look at the new patch set (#2).
Change subject: core: Use eventfd for alert pipes on Linux when possible
......................................................................
core: Use eventfd for alert pipes on Linux when possible
The primary win of switching to eventfd when possible is that it only
uses a single file descriptor while pipe() will use two. This means for
each bridge channel we're reducing the number of required file
descriptors by 1, and - if you're using timerfd - we also now have 1
less file descriptor per Asterisk channel.
The API is not ideal (passing int arrays), but this is the cleanest
approach I could come up with to maintain API/ABI.
I've also removed what I believe to be an erroneous code block that
checked the non-blocking flag on the pipe ends for each read. If the
file descriptor is 'losing' its non-blocking mode, it is because of a
bug somewhere else in our code.
In my testing I haven't seen any measurable difference in performance.
Change-Id: Iff0fb1573e7f7a187d5211ddc60aa8f3da3edb1d
---
M configure
M configure.ac
A include/asterisk/alertpipe.h
M include/asterisk/autoconfig.h.in
M include/asterisk/channel.h
A main/alertpipe.c
M main/bridge_channel.c
M main/channel_internal_api.c
8 files changed, 375 insertions(+), 203 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/97/5497/2
--
To view, visit https://gerrit.asterisk.org/5497
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iff0fb1573e7f7a187d5211ddc60aa8f3da3edb1d
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Jenkins2
More information about the asterisk-code-review
mailing list