-
Notifications
You must be signed in to change notification settings - Fork 129
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
Use get_max_fragment_size for medium_data tests #369
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a reasonable improvement!
Oh, lol—for the macOS implementation the max fragment size is usize::MAX, so that's why we're seeing |
Ah I guess that's because the macOS impl uses Mach ports. I'll set a cap on the fragment size used, thanks. |
Updated! Capped it at the previously-used 64KiB value. |
Are we sure we need to change these values? I think you need to make sure that fragmentation works on illumos: ipc-channel/src/platform/test.rs Lines 224 to 229 in 4e51f95
|
The huge_data tests do exercise fragmentation, but good point about those specific tests -- will enable that. Note however that ipc-channel doesn't yet compile on illumos, there's another PR I need to do which depends on this one. |
I've updated the PR summary to indicate what's happening. |
Some platforms like illumos have smaller buffer sizes, so use `get_max_fragment_size` which shouldn't block under ordinary circumstances. It would also be nice to move all of the fetches to other threads, but this appears to work quite well. See servo#101.
Also enabled the fragment tests on illumos. |
Hi — is there any way I can help get this landed? Thanks! |
Apologies for the wait and thanks for the fix. This looks good to me! |
Currently, the
medium_data
tests all hang on illumos because (a) we first send a message and then receive it on the same thread, and (b) the tests fill up the pipe buffer before the send is complete. That's because illumos uses a smaller buffer size than other platforms like Linux.The goal of these tests is to test situations where fragmentation doesn't happen, so use
get_max_fragment_size
which shouldn't fill up the pipe buffer under ordinary circumstances.(There are other tests which check for fragmentation, so that code path is still covered.)
It would also be nice to move all of the receives to other threads in the future, but this appears to work quite well.
See #101.