-
Notifications
You must be signed in to change notification settings - Fork 61
hard switching using Stackman #278
Comments
Stackman has until now been a one-person project. I did expend some effort in streamlining the api and trying to account for all use cases. I also added github actions to run test suite and prepare the pre-compiled binaries for supported platforms. I have been able to support all the modern desktop abis, except for the upcoming Windows on Arm64. The code is there, but unverified since I have been unable to actually get a runnable system with it. ... |
Linux and windows Arm64 support would be a compelling reason... |
There was a third attempt, years ago, when I replaced all the stack management code in stackless with the "tealet" module. I can't be sure, but I think it was back when we were using Mercurial and Bitbucket. That one probably never survived the transfer from Bitbucket. |
Hi Kristján, can you point me to libtealet? I can't find the repo anywhere. I'm going to convert https://bitbucket-archive.softwareheritage.org/projects/kr/krisvale/stackless-tealet.html to git. |
The old tealet patch is now available in pull request #279. |
right, it is https://github.com/kristjanvalur/libtealet. It is currently private, but there is no reason to. You should have access to it. considering transferring it to Stackelss-dev and making it public. |
Now that #283 is merged, the integration of Stackman should be straight forward. I'll upgrade merge request #230. I'm not sure that I understand the libtealet code well enough to port pull request #279 to our current code base. Additionally I have the impression, that #279 does a lot more than just replace the hard switching mechanism. |
Finally pull request #230 is ready. Kristján, please have a final look at it.
I'm really more than happy to get this pull request finally merged. Many thanks for providing Stackman. |
Stackless now uses Stackman https://github.com/stackless-dev/stackman for stack switching / hard tasklet switching. The legacy stack switching code is still available. See 'readme.txt' for details. The Stackman code is in a git submodule located below Stackless/stackman. You can control the usage of Stackman with the configure options "--with-stackman" and "--without-stackman". On Windows you can use the MSBuild property "stackmanDir". (To set a property add '"/p:name=value"' to the build.bat command line.) Co-authored-by: Anselm Kruis <[email protected]>
I just merged pull request #230. Still to do: eventually update the stackman version, if Kristján pushes more commits to https://github.com/stackless-dev/stackman. |
Hi, sorry for being AFK for so long, have been on vacation. I'll try to take a look at the mismatch between the two stackman forks. pros:
cons:
|
Me too. :-) Actually, I was on a business trip. |
Update stackman to commit dbc72fe520.
After Kristján pushed his changes, I just updated stackman to commit c572d4d07cc85. |
Update smelly.py to not complain about the symbol prefix "stackman_".
Great. Btw, I'm working on better making stackman releases and how to distribute the release binaries, maybe there will be future change :) |
The idea to share the stack switching code between different projects is not new, see issue #10. Last year Kristján Valur Jónsson made another attempt: pull request #230:
I open this issue to discuss those aspects, that are unrelated to a particular implementation.
What
Make it possible to use Stackman to implement stack-switching instead of the current Stackless code.
Why - Benefits and Drawbacks
Are there any arguments, why the performance of Stackman is better/worse than legacy Stackless stack switching?
When
Now. Stackless 3.7 is near its eol and Stackless 3.8 hasn't been released. Stackman seems to be sufficiently mature.
How
Pull request #230 proves that Stackman can be used, but there are many more ways to do it.
Options
make install
option to Stackman. In Stackless add an option--with-stackman
to configure.--without-stackman
).There might be more options.
Requirements
Some requirements. There might be more.
./configure && make && make test && make install
still works. Especially important for the Windows build process.As a consequence, Stackless should adhere to the Include-directory layout from C-Python.
Discussion
Just some preliminary thoughts
We can divide the possible options into two goups:
Currently Stackless is mostly used on Windows amd64 and Linux amd64 (32bit versions are fading away). On these platforms the existing hard switching code and building Stackless just works. Unless Stackman improves the performance, using Stackman or legacy Stackless stack-switching makes no difference. If there was a performance gain, we would prefer option 3...5.
Advantages of option 1 and 2:
Option 5 would be fairly similar to the legacy solution. Upgrading to a newer Stackman version become complicated.
The text was updated successfully, but these errors were encountered: