Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2221

Enable Multiple Cores by Supporting Removal of the GIL

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.9
    • 6.4
    • PySide, Shiboken
    • None
    • Qt for Python NoGIL
    • f489d5b90 (dev), ceb7567c7 (6.9), 7b8592161 (dev), 9d1124630 (dev), 481b48982 (dev), 559a0aa7b (dev), 8ea904ac0 (dev), 992093e0b (dev), 5738e06e7 (6.9), 39d406a96 (tqtc/lts-6.8), 2459c4c7d (dev), 65e8d9038 (dev), f0efc06db (dev), 04fc01fa4 (dev)

      Overview

      Python 3.12 is probably starting to support a no-gil configuration. PySide should to find the necessary changes to enable that in the PySide project. The anticipated community reaction
      is quite huge, since that will make Python really performant.

      Currently, there is only a prototype implementation that we are using. It is based on Python nogil-3.9.10-1 with a register machine and different opcodes. This version is by no means the version expected for the fall, when Python 3.12 should come into existence with NoGIL.

      It is not clear whether this branch will be continued at all. This depends very much
      on business decisions. I just wanted to make sure of the feasibility, but I'm not implementing it yet.
      The feasibility is definitely there if they have the right people and time.

      Areas in need of thread protection

      (to be identified by thread sanitizer).

      libshiboken/ Object deletion

      The question is whether one mutex should be used for all this (sort of GIL replacement), Potential candidate
      is the existing wrapper mapper lock.

      Signal/Slot connections

      The question is whether one mutex should be used for all of the signal code and the locked areas be extended?

      Override handling

      • Sbk_GetPyOverride, Spurious evidence so far.

      Done

      • setNextQObjectMemoryAddr() sources/pyside6/libpysideqml/pysideqmlregistertype.cpp:41 (thread_local?)
      • basic compile fixes, removed NoGIL code

      References

        For Gerrit Dashboard: PYSIDE-2221
        # Subject Branch Project Status CR V

            ctismer Christian Tismer
            ctismer Christian Tismer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are 8 open Gerrit changes