Skip to content
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

gnrc/sock: recv avoid spinning xtimer #16831

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

kfessel
Copy link
Contributor

@kfessel kfessel commented Sep 9, 2021

Contribution description

avoid spinning xtimer on socket receive with short timeout by increasing the timeout to XTIMER_BACKOFF

Testing procedure

run benchmark_udp with short intervalls

Issues/PRs references

possibly Fixes #16808

@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System labels Sep 9, 2021
@kfessel kfessel added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Sep 9, 2021
@benpicco
Copy link
Contributor

benpicco commented Sep 9, 2021

Good catch!

@benpicco
Copy link
Contributor

benpicco commented Sep 9, 2021

Just squash directly

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 9, 2021
@kfessel kfessel force-pushed the p-gnrc-short-recv-short-timeout branch from 2b560b7 to 6e5ddc3 Compare September 9, 2021 14:22
@kaspar030
Copy link
Contributor

my gcc says this:

/home/kaspar/src/riot/sys/net/gnrc/sock/gnrc_sock.c: In function 'gnrc_sock_recv':
/home/kaspar/src/riot/sys/net/gnrc/sock/gnrc_sock.c:121:5: error: "/*" within comment [-Werror=comment]
  121 |     /* the minimal not spinning timeout */
      |      

@kfessel kfessel force-pushed the p-gnrc-short-recv-short-timeout branch from 6e5ddc3 to 9975e05 Compare September 9, 2021 15:15
@kfessel kfessel force-pushed the p-gnrc-short-recv-short-timeout branch from 9975e05 to d192024 Compare September 9, 2021 15:16
@miri64
Copy link
Member

miri64 commented Sep 9, 2021

Might also need to be fixed in the other sock implementations.

@miri64
Copy link
Member

miri64 commented Sep 9, 2021

(but that can be done as a follow-up)

@benpicco
Copy link
Contributor

benpicco commented Sep 9, 2021

Hm, now tests/gnrc_sock_udp and tests/gnrc_sock_ip are failing

@kfessel kfessel force-pushed the p-gnrc-short-recv-short-timeout branch from d192024 to be28c53 Compare September 9, 2021 20:42
@kfessel
Copy link
Contributor Author

kfessel commented Sep 9, 2021

special case of 0 timout

@benpicco benpicco merged commit d04eb36 into RIOT-OS:master Sep 9, 2021
@benpicco benpicco added this to the Release 2021.10 milestone Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

benchmark_udp: hammering with low interval causes issues
4 participants