-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the SIO_LOOPBACK_FAST_PATH option to socket.ioctl #70723
Comments
Adding the SIO_LOOPBACK_FAST_PATH option to socket.ioctl on Windows allows Windows users to enable the loopback fast path option available on Windows 8+. This allows for much better TCP loopback performance on Windows. For more information on TCP Loopback Fast Path, see: |
The "Lifecycle of a Patch" document recommends pinging an issue after a month of no review. I do not see any special ping option, so I am assuming that means to post a comment. To help with code review I tried to keep this change very similar to a previous similar change: http://bugs.python.org/issue6971 |
Thanks for pinging, Daniel. I'm not a Windows user so I can't test the patch, but I left some review comments on Rietveld: http://bugs.python.org/review/26536/ |
Thank you for the review. I have made the changes suggested in the code and I have uploaded a new patch. |
I have added a zip containing a simple server and client to test the patch with. With loopback fast path enabled, I get 3-5x more throughput on my Windows 10 computer with an AMD 900 series chipset. |
Thanks for the test script. I left some minor comments about loopback_fast_path_v2.patch on Rietveld. |
I have uploaded a new patch with the suggested changes, thanks for the review. |
New changeset f8957c755c7a by Steve Dower in branch 'default': |
All looked good to me, and as far as I could see all of Berker's feedback was addressed, so consider it in! |
This is failing on Windows 7 buildbots: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7849/steps/test/logs/stdio Traceback (most recent call last):
File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_socket.py", line 1226, in test_sio_loopback_fast_path
s.ioctl(socket.SIO_LOOPBACK_FAST_PATH, True)
OSError: [WinError 10045] The attempted operation is not supported for the type of object referenced |
New changeset e8b10ed64e63 by Berker Peksag in branch 'default': |
It looks like SIO_LOOPBACK_FAST_PATH is also defined in older Windows versions. I updated the test to skip if SIO_LOOPBACK_FAST_PATH is defined and exc.winerror is WSAEOPNOTSUPP. Buildbot is now green: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7855 Please reopen if I did something wrong. |
New changeset 213c240cce0a by Berker Peksag in branch 'default': |
That'll handle the test fine, though I wonder whether we should try and conditionally define the constant at runtime? Probably at least want to add a note to the docs about Win 8 being the minimum, especially since so many people are still on 7. |
+1. Is it safe to use IsWindows8OrGreater()? |
That's the best function to use. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: