msg310072 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2018-01-16 10:48 |
In 2fb9ae9dfc5a6830d902332ba93b13387e292ddb, select.epoll() was changed to reject sizehint=-1, despite that still being documented as the default value. Would it be possible to reverse this change, making -1 a special value signaling select.epoll() to use sizehint=FD_SETSIZE-1, as was before this change? Additionally, in the same commit the docs were changed to say that the sizehint parameter is deprecated and has no effect, but later changes have restored use of sizehint in certain cases without updating the documentation. This inconsistency should be fixed. For reference, this came up as part of #31938. |
|
|
msg310073 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2018-01-16 10:49 |
Also see discussion in GitHub PR 4265 for #31938. |
|
|
msg310075 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-01-16 10:58 |
Also sizehint=0 was rejected before 2fb9ae9dfc5a6830d902332ba93b13387e292ddb. Now it is accepted. |
|
|
msg320236 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-06-22 13:46 |
> *flags* is deprecated and completely ignored. What if tomorrow, Linux accepts a new flag, passing the flag would just be ignored? Maybe it's fine. Especially usually Python developers only use flags exposed in Python, and currently, only EPOLL_CLOEXEC is exposed and this flag is useless in the specific case of Python (Python always uses the flag). |
|
|
msg320238 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-06-22 14:06 |
> Also sizehint=0 was rejected before 2fb9ae9dfc5a6830d902332ba93b13387e292ddb. Now it is accepted. DESCRIPTION epoll_create() creates a new epoll(7) instance. Since Linux 2.6.8, the size argument is ignored, but must be greater than zero; see NOTES below. (...) NOTES In the initial epoll_create() implementation, the size argument informed the kernel of the number of file descriptors that the caller expected to add to the epoll instance. The kernel used this informa‐ tion as a hint for the amount of space to initially allocate in inter‐ nal data structures describing events. (If necessary, the kernel would allocate more space if the caller's usage exceeded the hint given in size.) Nowadays, this hint is no longer required (the kernel dynami‐ cally sizes the required data structures without needing the hint), but size must still be greater than zero, in order to ensure backward com‐ patibility when new epoll applications are run on older kernels. |
|
|
msg320252 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2018-06-22 18:27 |
>> Also sizehint=0 was rejected before 2fb9ae9dfc5a6830d902332ba93b13387e292ddb. Now it is accepted. Please note that by "Now it is accepted" I meant in the current codebase, before PR 7840. In this regard, that PR changes nothing. Given the documentation quoted by Victor, perhaps it would be wise to review that earlier change. |
|
|
msg320774 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2018-06-30 12:43 |
New changeset 0cdf5f42898350261c5ff65d96334e736130780f by Tal Einat in branch 'master': bpo-32568: make select.epoll() and its docs consistent (#7840) https://github.com/python/cpython/commit/0cdf5f42898350261c5ff65d96334e736130780f |
|
|
msg320776 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2018-06-30 13:03 |
New changeset fd1c092bb9fee46d8d543710973c69a0e93a697a by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8024) https://github.com/python/cpython/commit/fd1c092bb9fee46d8d543710973c69a0e93a697a |
|
|
msg320778 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2018-06-30 13:15 |
New changeset db7ac30ef52ce35a4ead1bc1b9f0dd5331ed9779 by Tal Einat in branch '3.6': [3.6] bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8025) https://github.com/python/cpython/commit/db7ac30ef52ce35a4ead1bc1b9f0dd5331ed9779 |
|
|