[issue40512] Meta issue: per-interpreter GIL

2020-05-14 Thread STINNER Victor
STINNER Victor added the comment: > Add a lock to pymalloc, or disable pymalloc when subinterpreters are used: > (...) By the way, tracemalloc is not compatible with subinterpreters. test.support.run_in_subinterp() skips the test if tracemalloc is tracing. -- __

[issue40512] Meta issue: per-interpreter GIL

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: "Static" types are shared by all interpreters. We should convert them to heap allocated types using PyType_FromSpec(), see: * bpo-40077: Convert static types to PyType_FromSpec() * bpo-40601: [C API] Hide static types from the limited C API -- _

[issue40512] Meta issue: per-interpreter GIL

2020-05-06 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-39465: "Design a subinterpreter friendly alternative to _Py_IDENTIFIER". Currently, this C API is not compatible with subinterpreters. -- ___ Python tracker __

[issue40512] Meta issue: per-interpreter GIL

2020-05-06 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-40533: "Subinterpreters: don't share Python objects between interpreters". -- ___ Python tracker ___ _

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file49128/demo-pyperf.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: I updated demo-pyperf.py to also benchmark multiprocessing. -- ___ Python tracker ___ ___ Python-

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
Change by STINNER Victor : Removed file: https://bugs.python.org/file49126/demo.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
Change by STINNER Victor : Removed file: https://bugs.python.org/file49127/demo-pyperf.py ___ Python tracker ___ ___ Python-bugs-list mailin

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: Hum, demo.py is not reliable for threads: the standard deviation is quite large. I rewrote it using pyperf to compute the average and the standard deviation. -- Added file: https://bugs.python.org/file49127/demo-pyperf.py ___

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
Change by STINNER Victor : Removed file: https://bugs.python.org/file49124/demo.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: (oops, there was a typo in my script: threads and subinterpreters was the same benchmark) -- Added file: https://bugs.python.org/file49126/demo.py ___ Python tracker __

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: Attached demo.py: benchmark to compare performance of sequential execution, threads and subinterpreters. -- Added file: https://bugs.python.org/file49124/demo.py ___ Python tracker

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-40522: "Subinterpreters: get the current Python interpreter state from Thread Local Storage (autoTSSkey)". -- ___ Python tracker _

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread Kyle Stanley
Change by Kyle Stanley : -- nosy: +aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: > Some changes have a negative impact on "single threaded" Python application. > Even if the overhead is low, one option to be able to move faster on this > issue may be to add a new temporary configure option to have an opt-in build > mode to better isolate

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: > Move signals pending and gil_drop_request from _PyRuntimeState.ceval to > PyInterpreterState.ceval: > https://github.com/ericsnowcurrently/multi-core-python/issues/34 I created bpo-40513: "Move _PyRuntimeState.ceval to PyInterpreterState". -- ___

[issue40512] Meta issue: per-interpreter GIL

2020-05-05 Thread STINNER Victor
New submission from STINNER Victor : To be able to run multiple (sub)interpreters in parallel, the unique global interpreter lock aka "GIL" should be replace with multiple GILs: one "GIL" per interpreter. The scope of such per-interpreter GIL would be a single interpreter. The current CPytho