◐ Shell
reader mode source ↗
Skip to content

bpo-44032: Move data stack to thread from FrameObject.#26076

Merged
markshannon merged 21 commits into
python:mainfrom
faster-cpython:datastack-on-thread
May 21, 2021
Merged

bpo-44032: Move data stack to thread from FrameObject.#26076
markshannon merged 21 commits into
python:mainfrom
faster-cpython:datastack-on-thread

Conversation

@markshannon

@markshannon markshannon commented May 12, 2021

Copy link
Copy Markdown
Member

Move local, cell and free variables, plus the evaluation stack to the thread.
Cuts down the size of frames to under 100 bytes, and enables further optimizations of Python-to-Python calls.

https://bugs.python.org/issue44032

@markshannon markshannon force-pushed the datastack-on-thread branch from d9936c3 to 2c14939 Compare May 13, 2021 15:21
@ericsnowcurrently ericsnowcurrently self-requested a review May 17, 2021 16:31

@ericsnowcurrently ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

Overall, looks good and the value of this change seems pretty clear. 🙂

I'll probably take a second pass before approving. I mostly follow the change, but mapping the old code to the new conceptually isn't easy. The old code was fairly straight-forward to follow. The new code isn't quite so easy. It may help to have a bit more explanation somewhere of how the threadstate-based stack operates, including relative to frames.

@bedevere-bot

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@ericsnowcurrently ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

LGTM

After some offline discussion it makes sense now. We would still benefit from some explanation in the code though.

@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 20, 2021
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit c5ccb7d 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@markshannon

markshannon commented May 21, 2021

Copy link
Copy Markdown
Member Author

The failure was a timeout on test_multiprocessing_fork one of the refleak buildbots.
The other refleak buildbots passed though, so there are no leaks (at least not that are caught by the buildbots).

@markshannon markshannon merged commit b11a951 into python:main May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants