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

llmnrd daemon should not use busy waiting for packets #19

Closed
pali opened this issue Jan 7, 2017 · 0 comments
Closed

llmnrd daemon should not use busy waiting for packets #19

pali opened this issue Jan 7, 2017 · 0 comments

Comments

@pali
Copy link

pali commented Jan 7, 2017

Currently llmnrd daemon sleeps just for 50 miliseconds period and after that every time it check for incomming packet. In most cases there will be no incomming event and so in 99% time this daemon uses CPU just for waiting for packets. Daemon should wait in select syscall for infinite period of time and only incomming event (either packet or signal) should wake it up.

$ strace ./llmnrd
...
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant