GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — gh-115103: Update gc.collect to process delayed objects by corona10 · Pull Request #116238 · python/cpython Conversation
|
|
!buildbot nogil |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @corona10 for commit c28c79f 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
!buildbot nogil |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @corona10 for commit 81f333a 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Let's do this as part of the normal gc.collect() instead of adding a separate call. We want gc.collect() to be the go-to way to ensuring that things that should be freed are freed -- we already empty freelists and merge refcounts and will probably have a few more similar tasks in the near future (like collecting shared dictionary keys).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Yeah more better! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@pablogsal Do you have any comments? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| _PyEval_StopTheWorld(interp); | ||
| // merge refcounts for all queued objects | ||
| merge_all_queued_objects(interp, state); | ||
| process_delayed_frees(interp); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nit/question: _PyEval_StopTheWorld also locks _PyRuntime. Maybe is worth moving the lock up?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
_PyEval_StopTheWorld locks _PyRuntime temporarily to loop over threads, but does not hold the lock
We want process_delayed_frees after the stop-the-world call because it guarantees that we can free all the "delayed free" pointers. If we moved it up before the _PyEval_StopTheWorld there might be some memory blocks we don't free.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks for clarifying
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If we moved it up before the
_PyEval_StopTheWorldthere might be some memory blocks we don't free.
With "moving the lock up" i meant to have a unique locking for both functions, not to move this call before the other. But your comment still applies
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nah I forgot the change the PR title :( anyway, I merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I left the comment about commit title for the future tracker: #115103 (comment) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…cessDelayed (pythongh-116238)" This reverts commit 2e91578.
There was an error while loading. Please reload this page.
|
I tried to fix the commit title for tracking with the double revert technique but it doesn't work for git blame: d1fd060 Let's forget about it :( |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…gh-116251) * Revert "pythongh-115103: Update refleak checker to trigger _PyMem_ProcessDelayed (pythongh-116238)" This reverts commit 2e91578. * pythongh-115103: Update gc.collect to process delayed objects
…gh-116251) * Revert "pythongh-115103: Update refleak checker to trigger _PyMem_ProcessDelayed (pythongh-116238)" This reverts commit 2e91578. * pythongh-115103: Update gc.collect to process delayed objects
…gh-116251) * Revert "pythongh-115103: Update refleak checker to trigger _PyMem_ProcessDelayed (pythongh-116238)" This reverts commit 2e91578. * pythongh-115103: Update gc.collect to process delayed objects
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.