-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-112535: Update _Py_ThreadId() to support PowerPC #112624
Conversation
Not sure that this implementation was what @colesbury intended, but let's take a look. |
!buildbot s390x |
🤖 New build scheduled with the buildbot fleet by @vstinner for commit fd4c844 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Does someone have 32-bit PowerPC to test the change? I scheduled buildbot jobs on s390x to test the 64-bit code path. But oh wait, this code path requires to build Python without GIL? I can try to test the change manually on s390x. Which kind of test should I run? The Python test suite? |
Hmm, this PR is not about s390x. Is it meaningful?
Currently, yes, or you can debug the |
At the build bot, we have ppc64 but no ppc32 |
!buildbot ppc |
🤖 New build scheduled with the buildbot fleet by @corona10 for commit fd4c844 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
For IBM Z(s390x), I will create a PR separately after verifying the implementation strategy with @colesbury and @vstinner :) |
Oops. I confused ppc64 and s390x. The issue says "PowerPC and IBM Z". But ok, this PR is about PowerPC CPU, 32-bit and 64-bit. About buildbots, it seems like PPC has no NoGIL builder. So it should be tested manually. I have access to ppc64 machines, I can test manually.
What do you mean? Python test suite doesn't check it? Maybe we should add dedicated tests in the C API tests? |
IMO, it is an implementation detail about a thread that has ownership with a specific Python object. I am not sure that we need to have a specific test for this API. IMO, if it is not properly implemented, the refcount will not be processed properly so current tests are enough to check it. FYI, PEP 703 explains why |
I confirm that the ppc64 code path works with GCC 8.5 on RHEL 8.9 ppc64le. I tested manually my PR #112709 with this change on Linux x86-64 on Python built without GIL ( |
I tested the updated PR (now with Commands:
Tests output:
The |
I also tested this change on Fedora 38 ppc64le with clang 16.0.6: tests pass as well.
|
See python/cpython#112535 And python/cpython#112624 And python/cpython#112751 Rather than backporting a handful of small commits, let's wait for the next release.
_Py_ThreadId()
work on PowerPC, IBM Z, etc. #112535