You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modifying Python internals to have one GIL per interpreter (bpo-40512) is a large project which requires to modify many small things (again, see bpo-40512).
I propose to add a temporary build --experimental-isolated-subinterpreters build option to configure for developers who want to hack on isolated subinterpreters. The intent is to speedup bpo-40512 development by making some practice compromises, to have more time to properly design the real fixes.
For example, tuple, dict and frame have free lists which are shared by subinterpreters. A practical solution is to simply disable them at build time to avoid the need to have per-interpreter free lists.
Another example is pymalloc which is shared by all subinterpreters and rely on the unique global interpreter lock (GIL) to protect its internal states. A practical solution is to disable it and force the usage of libc malloc() function instead.
Some compromosises cannot be the default since they have a significant negative impact on performances. So I propose to add a temporary build option until all these small issues will be fixed.
--with-experimental-isolated-subinterpreters option name is very long on purpose: to advertize that you must not use it, unless you fully understand its purpose :-)
I didn't document the build option in Misc/SpecialBuilds.txt or Doc/whatsnew/3.9.rst on purpose: you should not use this special build :-) Basically, this option is only for Eric Snow and me :-D
It would probably make sense to remove the build option in the 3.9 release. We can leave it in master, but remove it in the 3.9 branch once it has been created.
changed the title [-]Add --experimental-isolated-subinterpreters build option[/-][+][subinterpreters] Add --experimental-isolated-subinterpreters build option[/+]on May 15, 2020
changed the title [-]Add --experimental-isolated-subinterpreters build option[/-][+][subinterpreters] Add --experimental-isolated-subinterpreters build option[/+]on May 15, 2020
New changeset 9512ad7 by Victor Stinner in branch '3.9':
[3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 (GH-20228) 9512ad7
Why do you need to reopen it? The title says "add --experimental-isolated-subinterpreters build option". If you are to remove it, it can be done in the new issue, no?
Activity
vstinner commentedon May 5, 2020
Modifying Python internals to have one GIL per interpreter (bpo-40512) is a large project which requires to modify many small things (again, see bpo-40512).
I propose to add a temporary build --experimental-isolated-subinterpreters build option to configure for developers who want to hack on isolated subinterpreters. The intent is to speedup bpo-40512 development by making some practice compromises, to have more time to properly design the real fixes.
For example, tuple, dict and frame have free lists which are shared by subinterpreters. A practical solution is to simply disable them at build time to avoid the need to have per-interpreter free lists.
Another example is pymalloc which is shared by all subinterpreters and rely on the unique global interpreter lock (GIL) to protect its internal states. A practical solution is to disable it and force the usage of libc malloc() function instead.
Some compromosises cannot be the default since they have a significant negative impact on performances. So I propose to add a temporary build option until all these small issues will be fixed.
vstinner commentedon May 5, 2020
New changeset c5fa364 by Victor Stinner in branch 'master':
bpo-40514: Add --with-experimental-isolated-subinterpreters (GH-19926)
c5fa364
vstinner commentedon May 5, 2020
--with-experimental-isolated-subinterpreters option name is very long on purpose: to advertize that you must not use it, unless you fully understand its purpose :-)
I didn't document the build option in Misc/SpecialBuilds.txt or Doc/whatsnew/3.9.rst on purpose: you should not use this special build :-) Basically, this option is only for Eric Snow and me :-D
ericsnowcurrently commentedon May 5, 2020
It would probably make sense to remove the build option in the 3.9 release. We can leave it in master, but remove it in the 3.9 branch once it has been created.
[-]Add --experimental-isolated-subinterpreters build option[/-][+][subinterpreters] Add --experimental-isolated-subinterpreters build option[/+][-]Add --experimental-isolated-subinterpreters build option[/-][+][subinterpreters] Add --experimental-isolated-subinterpreters build option[/+]vstinner commentedon May 19, 2020
New changeset 9512ad7 by Victor Stinner in branch '3.9':
[3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 (GH-20228)
9512ad7
vstinner commentedon Jun 5, 2020
I started to *remove* a few"#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS":
4 remaining items
kumaraditya303 commentedon May 25, 2022
Reopened for #93185
erlend-aasland commentedon May 25, 2022
Why do you need to reopen it? The title says "add --experimental-isolated-subinterpreters build option". If you are to remove it, it can be done in the new issue, no?
kumaraditya303 commentedon May 25, 2022
I reopened it as #93185 uses this issue in title, if that PR will use a new issue, this can be closed.
erlend-aasland commentedon May 25, 2022
Use #93185 for the removal; there is no need for this to be reopened.
bpo-40514: Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (gh-93185)
Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (cherry-picked GH-pythongh…
[3.11] bpo-40514: Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (gh-93185)…
Add subinterpreters removal from issue pythongh-84694 PRs pythongh-96499
Add subinterpreters removal from issue pythongh-84694 PRs pythongh-96499
Add subinterpreters removal from issue pythongh-84694 PRs pythongh-93185
gh-95913: Move subinterpreter exper removal to 3.11 WhatsNew (GH-98345)