Skip to content

GH-118095: Allow a variant of RESUME_CHECK in tier 2 - #118286

Merged
markshannon merged 4 commits into
python:mainfrom
faster-cpython:tier-2-safe-resume
Apr 29, 2024
Merged

markshannon merged 4 commits into
python:mainfrom
faster-cpython:tier-2-safe-resume

Conversation

@markshannon

@markshannon markshannon commented Apr 25, 2024 •

Copy link
Copy Markdown
Member

Currently executors cannot start with RESUME or RESUME_CHECK.

This PR adds two special tier 2 uops that allow the eval_breaker to be check efficiently and to guarantee progress if the executor would start with RESUME or RESUME_CHECK.

@gvanrossum gvanrossum 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.

Impressive!

@markshannon

markshannon commented Apr 26, 2024 •

Copy link
Copy Markdown
Member Author

Unfortunately it seems that my assumption that _Py_HandlePending clears the flags is false, so this doesn't work.
I think the general idea of moving the expensive operation off out line is sound, but the details need working out.

It appears that _Py_HandlePending may leave the eval breaker set to non-zero, but that it will eventually clear it if called repeatedly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants