Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
GH-109369: Add machinery for deoptimizing tier2 executors, both individually and globally.#110384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Skipping news, as this an implementation detail |
gvanrossum commentedOct 18, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Okay, let me summarize what's here so we know I understand. Then I will start a code review.
All in all I think this is a fine plan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is cool, a rare excursion to classic data structures! I'm not sure, but I worry about a bug in the linked list code when unlinking the head node promotes another node to being the head; see comment inunlink_executor().
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
brandtbucher commentedOct 24, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It looks like this PR introduced refleaks and assertion failures when running I'm looking into it more now, but is there anything obvious to either of you that may be causing this? |
Possibly the refleaks might be cured by increasing the warmup count (changing the No idea about the assertion failure. |
| void | ||
| _Py_Executor_DependsOn(_PyExecutorObject*executor,void*obj) | ||
| { | ||
| assert(executor->vm_data.valid= true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Not the issue, but something I noticed while combing over this:
| assert(executor->vm_data.valid= true); | |
| assert(executor->vm_data.valid== true); |
See#111339 for the test_embed crashes etc. |
… individually and globally. (pythonGH-110384)
… individually and globally. (pythonGH-110384)
This PR just provides the machinery; we still need to add support for exiting executors when their
validflag is falsified.The implementation uses abloom filter.
The advantage of a bloom filter is that it requires no coupling between the executors and the objects they depend on, plus it is simpler to implement and uses less memory than a precise mapping.
I've chosen k = 6 and m = 256.
This should give a low enough false positive rate for most cases. We want to keep the false positive rate very low, as spurious de-optimizations could be expensive.