<div dir="ltr">The short answer is, PyPy has its own implementation of greenlets, <a href="https://bitbucket.org/pypy/pypy/src/default/lib_pypy/greenlet.py">https://bitbucket.org/pypy/pypy/src/default/lib_pypy/greenlet.py</a> , this is built on top of a module called <span style="color:rgb(85,85,85);font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4">_continuation, </span><font color="#555555" face="Bitstream Vera Sans Mono, DejaVu Sans Mono, Monaco, monospace"><span style="font-size:12px;line-height:16px"><a href="http://doc.pypy.org/en/latest/stackless.html">http://doc.pypy.org/en/latest/stackless.html</a> contains some of the details of how it works.</span></font><div>
<font color="#555555" face="Bitstream Vera Sans Mono, DejaVu Sans Mono, Monaco, monospace"><span style="font-size:12px;line-height:16px"><br></span></font></div><div><font color="#555555" face="Bitstream Vera Sans Mono, DejaVu Sans Mono, Monaco, monospace"><span style="font-size:12px;line-height:16px">Alex</span></font></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 15, 2013 at 2:43 PM, Joshua Harlow <span dir="ltr"><<a href="mailto:harlowja@yahoo-inc.com" target="_blank">harlowja@yahoo-inc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Cool,<br>
<br>
Are there any technical docs for how eventlet/greenlet work in PyPy,<br>
<br>
>From my knowledge of greenlet its doing some pretty low level stuff that would seem hard to mirror in PyPy.<br>
<br>
<a href="https://github.com/python-greenlet/greenlet/blob/master/greenlet.c#L9" target="_blank">https://github.com/python-greenlet/greenlet/blob/master/greenlet.c#L9</a><br>
<br>
And the very platform specific stack switching functions @ <a href="https://github.com/python-greenlet/greenlet/tree/master/platform" target="_blank">
https://github.com/python-greenlet/greenlet/tree/master/platform</a><br>
<br>
It would seem like greenlet is pretty tightly coupled to the cpython and its functionality. I'd like to know how it can operate in pypy without major modifications, maybe u know of such a documentation that explains this. I'd be interested in reading that at
 least (maybe others would like to also). <br>
<br>
:-)<br>
<br>
-Josh
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> Alex Gaynor [<a href="mailto:alex.gaynor@gmail.com" target="_blank">alex.gaynor@gmail.com</a>]<br>
<b>Sent:</b> Tuesday, September 10, 2013 8:18 AM<br>
<b>To:</b> OpenStack Development Mailing List<br>
<b>Subject:</b> Re: [openstack-dev] OpenStack + PyPy: Status and goals<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">Hi Roman,
<div><br>
</div>
<div>Yes eventlet works well on PyPy, both Marconi and Swift use it.</div>
<div><br>
</div>
<div>Alex<br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Sep 9, 2013 at 10:15 PM, Roman Podolyaka <span dir="ltr">
<<a href="mailto:rpodolyaka@mirantis.com" target="_blank">rpodolyaka@mirantis.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Alex,
<div><br>
</div>
<div>That's really cool! I believe, performance is not the only benefit we can get from running OpenStack projects on PyPy. We  can also improve the overall "correctness" of our code (as PyPy behaves differently with non-closed files, etc), just like compiling
 of your C/C++ app using different compilers can show hidden errors.</div>
<div><br>
</div>
<div>And what about eventlet? Does it work well on PyPy? (as it is used in Nova, Neutron, etc)</div>
<div>
<div><br>
</div>
<div>Thanks,</div>
<div>Roman</div>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
<div>
<div>On Tue, Sep 10, 2013 at 12:28 AM, Alex Gaynor <span dir="ltr"><<a href="mailto:alex.gaynor@gmail.com" target="_blank">alex.gaynor@gmail.com</a>></span> wrote:<br>
</div>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div>
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>Many of you have probably seen me send review requests in the last few weeks</div>
<div>about adding PyPy support to various OpenStack projects. A few people were</div>
<div>confused by these, so I wanted to fill everyone in on what I'm up to :)</div>
<div><br>
</div>
<div>First, for those who aren't familiar with what PyPy is: PyPy is an</div>
<div>implementation of the Python language which includes a high performance tracing</div>
<div>just-in-time compiler and which is faster than CPython (the reference, and most</div>
<div>widely deployed, implementation) on almost all workloads.</div>
<div><br>
</div>
<div>The current status is:</div>
<div><br>
</div>
<div>Two major projects work, both Marconi and Swift, Marconi is gating against PyPy</div>
<div>already, Swift isn't yet since I needed to fix a few small PyPy bugs and those</div>
<div>aren't in a release yet, expect it soon :)</div>
<div><br>
</div>
<div>In terms of results, I've observed 30% performance improvements on GET</div>
<div>workloads for Swift under PyPy vs. CPython (other workloads haven't been</div>
<div>benchmarked tet). I believe the Marconi folks have also observed some</div>
<div>performance wins, but I'll let them speak to that, I don't have the full</div>
<div>details.</div>
<div><br>
</div>
<div>Many python-clients projects are also working out of the box and gating:</div>
<div>including novaclient, swiftclient, marconiclient, ceilometerclient, heatclient,</div>
<div>and ironicclient!</div>
<div><br>
</div>
<div>There's a few outstanding reviews to add PyPy gating for cinderclient,</div>
<div>troveclient, and glanceclient.</div>
<div><br>
</div>
<div>In terms of future direction:</div>
<div><br>
</div>
<div>I'm going to continue to work on getting more projects running and gating</div>
<div>against PyPy.</div>
<div><br>
</div>
<div>Right now I'm focusing a lot of my attention on improving Swift performance,</div>
<div>particularly under PyPy, but also under CPython.</div>
<div><br>
</div>
<div>I'm hoping some day PyPy will be the default way to deploy OpenStack!</div>
<div><br>
</div>
<div><br>
</div>
<div>If you're interested in getting your project running on PyPy, or looking at</div>
<div>performance under it, please let me know, I'm always interested in helping!</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Alex</div>
<span><font color="#888888">
<div><br>
</div>
-- <br>
<div dir="ltr">"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
"The people's good is the highest law." -- Cicero<br>
<div>GPG Key fingerprint: 125F 5C67 DFE9 4084</div>
</div>
</font></span></div>
<br>
</div>
</div>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
"The people's good is the highest law." -- Cicero<br>
<div>GPG Key fingerprint: 125F 5C67 DFE9 4084</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
"The people's good is the highest law." -- Cicero<br><div>GPG Key fingerprint: 125F 5C67 DFE9 4084</div></div>
</div>