I seem to be having a problem with nanosleep in v11 of SUSE (and other recent Linux flavours).
I made a very simple test program that just endlessly calls nanosleep with a time of 1000 nanoseconds. The newer versions of Linux show a pretty significant CPU load (as reported by top). The same program on an older version of Linux shows virtually no CPU load.
For example:
openSUSE 10.3: does not show up in the list shown from top
openSUSE 11.0: 40% CPU usage
openSUSE 11.1: 35% CPU usage
I have also observed the same high CPU load with Ubuntu 8.04 and Fedora 9. The key thing I have observed is that any version of Linux I have tried with a kernel version of 2.6.22 or lower will show essentially no CPU load. The newer kernel versions will show significant load. Has anybody else observed this?
As I recall a different scheduler could show the problem, so perhaps that
changed around 2.6.22?
Good luck.
longislandkm wrote:
> I seem to be having a problem with nanosleep in v11 of SUSE (and other
> recent Linux flavours).
>
> I made a very simple test program that just endlessly calls nanosleep
> with a time of 1000 nanoseconds. The newer versions of Linux show a
> pretty significant CPU load (as reported by top). The same program on
> an older version of Linux shows virtually no CPU load.
>
> For example:
> openSUSE 10.3: does not show up in the list shown from top
> openSUSE 11.0: 40% CPU usage
> openSUSE 11.1: 35% CPU usage
>
> I have also observed the same high CPU load with Ubuntu 8.04 and Fedora
> 9. The key thing I have observed is that any version of Linux I have
> tried with a kernel version of 2.6.22 or lower will show essentially no
> CPU load. The newer kernel versions will show significant load. Has
> anybody else observed this?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org