non port: lang/python36/files/patch-Modules___posixsubprocess.c |
Number of commits found: 2 |
Wednesday, 14 Oct 2020
|
18:09 kevans
lang/python3{6,7,8,9}: Backport close_range patches
Worked out over BPO-40422 and BPO-40423, this is the culmination of months
of work to coordinate with Linux and get close_range(2) added to FreeBSD,
then the usage accepted into CPython. It has landed for Python 3.10 and here
I've backported it locally to all the supported Python 3 versions we have.
Note that this does include and supercede our previous closefrom(2) patches.
There was a lot of intersection between the work done, so this patch against
the ports tree does remove those patches from each of the ports in favor of
this patch. All the patches involved have been accepted and merged upstream.
This patch will bring a performance boost in some more situations on 12.2
and 13.0, as close_range exists there.
There is one additional patch sitting in an upstream PR that shuffles the
_Py_closerange implementation into a different file -- this is not important
for the backport, and the absence of that patch here will not realistically
cause any issues.
PR: 250322
Approved by: lwhsu (python)
|
Friday, 29 Nov 2019
|
10:55 koobs
lang/python{27,35,36,37,38}: Add closefrom(2) support
A single close(fd) syscall is cheap, but when MAXFDS (maximum file
descriptor number) is high, the loop calling close(fd) on each file
descriptor can take several milliseconds.
The default value of subprocess.Popen "close_fds" parameter changed to True
in Python 3. Compared to Python 2, close_fds=True can make Popen 10x
slower: see bpo-37790 [1]
The present workaround on FreeBSD to improve performance is to load and
mount the fdescfs kernel module, but this is not enabled by default.
This change adds minimum viable (and upstreamable) closefrom(2) syscall
support to Python's subprocess and posix modules, improving performance (Only the first 15 lines of the commit message are shown above )
|
Number of commits found: 2 |