Topic: sched_yield() on OpenSUSE and game pauses
Hello,
I've noticed a strange behavior with the game on OpenSUSE 11.1. Previously I had Debian sid/lenny and everything was ok...
When I'll run Teeworlds 0.5.1 and join a game it's everything all right. Problem starts when I'll disconnect and join other (or the same) server. The game pauses for a 2/5 or 3/5 of a second in random moments.
I've made a research that tells me that other process in system can make the pause. This is the result of strace -c -f when everything is working fine:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
28.25 9.580599 4790300 2 1 waitpid
26.55 9.006770 1286 7005 nanosleep
24.97 8.469265 169 50086 1 futex
19.47 6.603668 103 64045 poll
0.25 0.085541 0 2208483 sched_yield
0.25 0.084557 19 4493 1 ioctl
0.13 0.043542 0 458162 gettimeofday
And when I join another game:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
30.37 1424.512992 4858 293210 4 futex
29.88 1401.628879 104 13494042 sched_yield
24.00 1125.832191 380 2966590 gettimeofday
23.77 1115.024835 19199 58076 write
20.55 963.705104 21199 45459 nanosleep
15.85 743.617462 2834 262435 160246 read
15.10 708.214086 19201 36884 25191 recvfrom
12.96 607.998292 20293 29961 1 ioctl
Look at sched_yield() system call in both examples.
I was watching at the "top" while playing game and nothing suspicious was going on there.
Btw. I have some sound clicks and pops problems too, but not only in Teeworlds. This is related to PulseAudio so this is my first suspect.