aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/pollset_posix.h
Commit message (Collapse)AuthorAge
* Remove pollset fd deletion path: its unusedGravatar Craig Tiller2015-12-11
|
* stream_op cleanup: pollset changesGravatar Craig Tiller2015-11-02
|
* Fix nap condition for pollset wakeupGravatar Craig Tiller2015-11-02
| | | | | | | | | | | | If: - one thread issues a kick forcing pollset re-evaluation - concurrently with a second thread forcing a specific poller to be awoken And: - both threads kicks are processed as a single wakeup Then: - since we enqueue nothing to the exec_ctx in this situation, we responded to the wakeup by doing another poll until the timeout, ignoring urgent work up the stack Fix this by flagging that a specific worker was designated to be awoken (since this is a good signal that we really really need to wake up), and use that to still re-evaluate the poll set, but with an immediate deadline so that we fall out of the poll loop as soon as possible.
* clang-formatGravatar Craig Tiller2015-10-06
|
* ex --> extGravatar Craig Tiller2015-10-06
|
* CommentaryGravatar Craig Tiller2015-10-02
|
* clang-formatGravatar Craig Tiller2015-10-02
|
* Allow fd_posix to force a re-evaluation of polling on wakeupGravatar Craig Tiller2015-10-01
|
* Fix alarmsGravatar Craig Tiller2015-09-28
| | | | | | - make kick_poller() do something on POSIX - fix some conditions whereby alarms are held in a pollset exec context for too long - make channel_connectivity tests dependent on the correct behavior
* clang-format all core filesGravatar Craig Tiller2015-09-22
|
* Move arguments to the start of listsGravatar Craig Tiller2015-09-22
|
* indent pass to get logical source lines on one physical lineGravatar Craig Tiller2015-09-22
|
* Split closures from iomgr.hGravatar Craig Tiller2015-09-22
|
* Rename call_list to closure_listGravatar Craig Tiller2015-09-22
|
* Call list progressGravatar Craig Tiller2015-09-18
|
* CleanupGravatar Craig Tiller2015-09-18
|
* Introduce call lists for moving work outside locksGravatar Craig Tiller2015-09-18
|
* Add a test of non-blocking API behaviorGravatar Craig Tiller2015-08-06
| | | | ... also fix things that were broken :)
* Working towards a non-blocking API testGravatar Craig Tiller2015-08-06
|
* Fix TSAN reported lock-inversion in epoll fd additionGravatar Craig Tiller2015-07-30
|
* Allow specific pollers to be wokenGravatar Craig Tiller2015-07-29
| | | | | | | | | | | | | | | | | | | Currently, if two threads call grpc_completion_queue_pluck on the same completion queue for different tags, there is a 50% chance that we deliver the completion wakeup to the wrong poller - forcing the correct poller to wait until its polling times out before it can return an event up to the application. This change tweaks our polling interfaces so that we can indeed wake a specific poller. Nothing has been performance tuned yet. It's definitely sub-optimal in a number of places. Wakeup file-descriptors should be recycled. We should have a path that avoids calling poll() followed by epoll(). We can probably live without it right at the second though. This code will fail on Windows at least (I'll do that port when I'm in the office and have a Windows machine).
* Hoist epoll_ctl outside of pollset lockGravatar Craig Tiller2015-07-14
|
* Remove return status from maybe_work.Gravatar Craig Tiller2015-06-22
| | | | | | | Since alarm checks may mutate work deadlines for pollsets, the value returned from maybe_work is meaningless. Instead, maybe pollset_work always return 1 if maybe_work is invoked, and then redo the deadline check _on the next call_ to pollset_work.
* DocsGravatar Craig Tiller2015-06-18
|
* prevent double destroy of pollsetGravatar Jan Tattermusch2015-06-10
|
* Release all fd refs before signalling shutdownGravatar Craig Tiller2015-06-01
|
* Merge branch 'but-maybe-i-want-to-poll' into we-dont-need-no-backupGravatar Craig Tiller2015-05-29
|\
| * clang-formatGravatar Craig Tiller2015-05-29
| |
* | Merge branch 'but-maybe-i-want-to-poll' into we-dont-need-no-backupGravatar Craig Tiller2015-05-29
|\|
| * Make it possible to run with poll() instead of epoll()Gravatar Craig Tiller2015-05-29
| | | | | | | | | | Mostly to facilitate testing, but maybe in the future we want to work on Linux systems with broken epoll support?
* | Refactor pollset_kickGravatar Craig Tiller2015-05-28
| | | | | | | | | | Allow multiple threads to be polling Remove unnecessary windows stubs
* | Remove condition variable from pollsetGravatar Craig Tiller2015-05-28
| |
* | Remove backup pollsetGravatar Craig Tiller2015-05-06
|/
* Guard headers tool.Gravatar Nicolas "Pixel" Noble2015-03-01
|
* Add a shutdown API to pollsetGravatar David Klempner2015-02-24
| | | | | | | | This allows us to safely asynchronously add FDs in the possibly-promoting unary add case. Also fix the unary add async path to properly handle more of the extra cases it needs to handle.
* Add missing new-lines at end of fileGravatar Craig Tiller2015-02-18
|
* Update copyright to 2015Gravatar Craig Tiller2015-02-18
|
* Epoll based multipollerGravatar David Klempner2015-02-10
| | | | | | | | | | | | | | This is a multipoller based on epoll rather than poll. Note that this implementation is aimed at correctness rather than performance, although it should immediately have better scalability to large numbers of FDs, both due to epoll's O(1) sized API and due to not needing to wake up polling threads to do interest set changes. One notable difference here is that we directly attach a wakeup fd rather than using the freelisting kick mechanism that the poll() based implementations use, because modifying the epoll set to use a different kick fd each time isn't free.
* Expanded commentGravatar Craig Tiller2015-01-31
|
* Fix some TSAN reported errorsGravatar Craig Tiller2015-01-29
|
* Factor out the pollset kicking mechanism and eliminate shardingGravatar David Klempner2015-01-16
| | | | | | | | | This change pulls out a separate pollset_kick module, which currently uses a freelist of pipes dynamically assigned to pollsets when they enter polling rather than the previous racy sharding mechanism. We ultimately may wish to eliminate the dynamic assignment for multipoll sets, but this should be sufficient for the moment.
* () --> (void)Gravatar Craig Tiller2015-01-15
|
* Remove libevent.Gravatar ctiller2015-01-09
| | | | | | | | | | | | | | | | | | | | | | | Fixed any exposed bugs across the stack. Add a poll() based implementation. Heavily leverages pollset infrastructure to allow small polls to be the norm. Exposes a mechanism to plug in epoll/kqueue for platforms where we have them. Simplify iomgr callbacks to return one bit of success or failure (instead of the multi valued result that was mostly unused previously). This will ease the burden on new implementations, and the previous system provided no real value anyway. Removed timeouts on endpoint read/write routines. This simplifies porting burden by providing a more orthogonal interface, and the functionality can always be replicated when desired by using an alarm combined with endpoint_shutdown. I'm fairly certain we ended up with this interface because it was convenient to do from libevent. Things that need attention still: - adding an fd to a pollset is O(n^2) - but this is probably ok given that we'll not use this for multipolling once platform specific implementations are added. - we rely on the backup poller too often - especially for SSL handshakes and for client connection establishment we should have a better mechanism ([] [] - Linux needs to use epoll for multiple fds, FreeBSD variants (including Darwin) need to use kqueue. ([] [] - Linux needs to use eventfd for poll kicking. ([] Change on 2015/01/07 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83461069
* Add a --forever flag, to continuously run tests as things change.Gravatar ctiller2015-01-09
| | | | | | | Change on 2015/01/07 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83451760
* Remove libevent.Gravatar ctiller2015-01-08
Fixed any exposed bugs across the stack. Add a poll() based implementation. Heavily leverages pollset infrastructure to allow small polls to be the norm. Exposes a mechanism to plug in epoll/kqueue for platforms where we have them. Simplify iomgr callbacks to return one bit of success or failure (instead of the multi valued result that was mostly unused previously). This will ease the burden on new implementations, and the previous system provided no real value anyway. Removed timeouts on endpoint read/write routines. This simplifies porting burden by providing a more orthogonal interface, and the functionality can always be replicated when desired by using an alarm combined with endpoint_shutdown. I'm fairly certain we ended up with this interface because it was convenient to do from libevent. Things that need attention still: - adding an fd to a pollset is O(n^2) - but this is probably ok given that we'll not use this for multipolling once platform specific implementations are added. - we rely on the backup poller too often - especially for SSL handshakes and for client connection establishment we should have a better mechanism ([] [] - Linux needs to use epoll for multiple fds, FreeBSD variants (including Darwin) need to use kqueue. ([] [] - Linux needs to use eventfd for poll kicking. ([] Change on 2015/01/07 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83461069