[Twisted-Python] epoll reactor
![](https://secure.gravatar.com/avatar/b0946d355122de2b0f141130708e5cf2.jpg?s=120&d=mm&r=g)
Hi all I've implemented an epoll reactor using the level triggered mechanism. Please check it out and let me know if there's anything I've done wrong. This is the first time I've played with twisted reactor internals before. :) http://msn-transport.jabberstudio.org/tarballs/epoll-0.1.tar.gz There's a README file in the tarball with instructions on setting it up. Enjoy! :) --- James
![](https://secure.gravatar.com/avatar/b0946d355122de2b0f141130708e5cf2.jpg?s=120&d=mm&r=g)
Well, I got it to work properly now :) http://msn-transport.jabberstudio.org/tarballs/epoll-0.2.tar.gz It's now uses the epoll edge triggered flag, and doesn't chew 99% CPU like the first one accidentally did. --- James On 22/05/2005, at 12:37 PM, James Bunton wrote:
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Mon, 23 May 2005 22:08:43 +1000, James Bunton <james@delx.cjb.net> wrote:
Neat. There has been a level-triggered epoll reactor in my sandbox for some time, but I was never able to get the edge triggered version to work. Hmm, running the Twisted test suite with this version doesn't do too well either. A few tests fail here and there before it gets totally wedged on twisted.test.test_pb.ConnectionTestCase.testIdentityConnector. You can try this yourself by adding an entry for this reactor to the dictionary at the top of twisted.application.app, then running "trial -R -r epoll twisted", where "epoll" is the key you add to that dict. Jp
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Tue, 24 May 2005 23:13:51 +1000, James Bunton <james@delx.cjb.net> wrote:
The poll reactor seems to be doing okay on the buildslave: http://twistedmatrix.com/buildbot/ Maybe it's skipping some tests that are running on your machine? Jp
![](https://secure.gravatar.com/avatar/b0946d355122de2b0f141130708e5cf2.jpg?s=120&d=mm&r=g)
On 24/05/2005, at 11:48 PM, Jp Calderone wrote:
Do you know how I can tell which tests are ok to skip? And how to skip them? The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred. http://msn-transport.jabberstudio.org/tarballs/epoll-0.3.tar.gz That should do a little better with the tests. It still fails some, but they seem to be the same ones that poll fails also. --- James
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Wed, 25 May 2005 23:30:52 +1000, James Bunton <james@delx.cjb.net> wrote:
If you check out the "problems" link, it lists which tests are being skipped. One such page is at <http://twistedmatrix.com/buildbot/reactors/builds/389/poll/2>.
Cool, I'll give it a try later today. Jp
![](https://secure.gravatar.com/avatar/b3407ff6ccd34c6e7c7a9fdcfba67a45.jpg?s=120&d=mm&r=g)
On Wed, May 25, 2005 at 11:30:52PM +1000, James Bunton wrote: [...]
The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred.
The buildbot page does give the full test output in the "log" links, as well as the full test.log file in the "test.log" links. The "problems" and "warnings" links are filtered versions of the "log" output. -Andrew.
![](https://secure.gravatar.com/avatar/b0946d355122de2b0f141130708e5cf2.jpg?s=120&d=mm&r=g)
Well, I got it to work properly now :) http://msn-transport.jabberstudio.org/tarballs/epoll-0.2.tar.gz It's now uses the epoll edge triggered flag, and doesn't chew 99% CPU like the first one accidentally did. --- James On 22/05/2005, at 12:37 PM, James Bunton wrote:
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Mon, 23 May 2005 22:08:43 +1000, James Bunton <james@delx.cjb.net> wrote:
Neat. There has been a level-triggered epoll reactor in my sandbox for some time, but I was never able to get the edge triggered version to work. Hmm, running the Twisted test suite with this version doesn't do too well either. A few tests fail here and there before it gets totally wedged on twisted.test.test_pb.ConnectionTestCase.testIdentityConnector. You can try this yourself by adding an entry for this reactor to the dictionary at the top of twisted.application.app, then running "trial -R -r epoll twisted", where "epoll" is the key you add to that dict. Jp
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Tue, 24 May 2005 23:13:51 +1000, James Bunton <james@delx.cjb.net> wrote:
The poll reactor seems to be doing okay on the buildslave: http://twistedmatrix.com/buildbot/ Maybe it's skipping some tests that are running on your machine? Jp
![](https://secure.gravatar.com/avatar/b0946d355122de2b0f141130708e5cf2.jpg?s=120&d=mm&r=g)
On 24/05/2005, at 11:48 PM, Jp Calderone wrote:
Do you know how I can tell which tests are ok to skip? And how to skip them? The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred. http://msn-transport.jabberstudio.org/tarballs/epoll-0.3.tar.gz That should do a little better with the tests. It still fails some, but they seem to be the same ones that poll fails also. --- James
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Wed, 25 May 2005 23:30:52 +1000, James Bunton <james@delx.cjb.net> wrote:
If you check out the "problems" link, it lists which tests are being skipped. One such page is at <http://twistedmatrix.com/buildbot/reactors/builds/389/poll/2>.
Cool, I'll give it a try later today. Jp
![](https://secure.gravatar.com/avatar/b3407ff6ccd34c6e7c7a9fdcfba67a45.jpg?s=120&d=mm&r=g)
On Wed, May 25, 2005 at 11:30:52PM +1000, James Bunton wrote: [...]
The buildbot page didn't seem to say what tests were actually run, only the warnings that occurred.
The buildbot page does give the full test output in the "log" links, as well as the full test.log file in the "test.log" links. The "problems" and "warnings" links are filtered versions of the "log" output. -Andrew.
participants (3)
-
Andrew Bennetts
-
James Bunton
-
Jp Calderone