Skip to content
This repository was archived by the owner on Apr 27, 2023. It is now read-only.

Conversation

@rzezeski
Copy link
Contributor

I want this feature for two reasons:

  1. The Solarflare pingpong test has it and this is our replacement for that benchmark tool.
  2. The upper-half of the recv() path is different on illumos depending on if you make a blocking call or not. I want to be able to test that path.

This option can reduce latency by 10-14% on SmartOS so I think it's a good feature to have to demonstrate the amount of overhead the blocking call can add.

@gdamore
Copy link
Contributor

gdamore commented Nov 18, 2015

Ok, looking at this, the code looks reasonable. I'm not sure if "spin" is the right way to describe it -- the main difference is that you're doing a non-blocking operation (and yes, spinning), instead of blocking. I guess its ok though.

That said, of course spinning is a tragically bad idea to use in production. :-)

@rzezeski
Copy link
Contributor Author

I call this a spin loop since it is spinning on recv. It could also be called a busy-wait or busy-looping according to wikipedia (https://en.wikipedia.org/wiki/Busy_waiting). If you want me to change the name then I'm fine with that, but I think spin best describes what it does.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants