Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-114746: Avoid quadratic behavior in free-threaded GC#114817
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
The free-threaded build's GC implementation is non-generational, but wasscheduled as if it were collecting a young generation leading toquadratic behavior. This increases the minimum threshold and scales itto the number of live objects as we do for the old generation in thedefault build.Note that the scheduling is still not thread-safe without the GIL. Thosechanges will come in later PRs.A few tests, like "test_sneaky_frame_object" rely on prompt schedulingof the GC. For now, to keep that test passing, we disable the scaledthreshold after calls like `gc.set_threshold(1, 0, 0)`.
colesbury commentedJan 31, 2024
!buildbot nogil |
bedevere-bot commentedJan 31, 2024
🤖 New build scheduled with the buildbot fleet by@colesbury for commit66959ca 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
colesbury commentedJan 31, 2024
@itamaro - I think this fixes the nogil Windows build bot timeouts. The "Ubuntu NoGIL Refleaks" buildbot still seems quite slow, but I think that was the case before the GC changes. |
encukou commentedFeb 1, 2024
Ubuntu refleaks failed with a transient issue, which looks unrelated: A re-run passed. But I'm sure the flock issue will come up again, especially when I get around to monitoring re-ran Buildbot tests. |
encukou commentedFeb 1, 2024
Thank you for the quick fix! |
…GH-114817)The free-threaded build's GC implementation is non-generational, but wasscheduled as if it were collecting a young generation leading toquadratic behavior. This increases the minimum threshold and scales itto the number of live objects as we do for the old generation in thedefault build.Note that the scheduling is still not thread-safe without the GIL. Thosechanges will come in later PRs.A few tests, like "test_sneaky_frame_object" rely on prompt schedulingof the GC. For now, to keep that test passing, we disable the scaledthreshold after calls like `gc.set_threshold(1, 0, 0)`.
Uh oh!
There was an error while loading.Please reload this page.
The free-threaded build's GC implementation is non-generational, but was scheduled as if it were collecting a young generation leading to quadratic behavior. This increases the minimum threshold and scales it to the number of live objects as we do for the old generation in the default build.
Note that the scheduling is still not thread-safe without the GIL. Those changes will come in later PRs.
A few tests, like "test_sneaky_frame_object" rely on prompt scheduling of the GC. For now, to keep that test passing, we disable the scaled threshold after calls like
gc.set_threshold(1, 0, 0).