thread switching time?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

thread switching time?

Krassimir Slavchev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello All,

I am using FreeBSD 7 and would like to decrease the time of switching
between threads. This time seems to be 1ms and it is impossible to make
lower delays inside a thread, at least using nanosleep().

Is it possible to decrease this time to 1us?


Best Regards
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFJCIEkxJBWvpalMpkRAmKUAKCehUxakt83IvQ/QhW2n0BicWaQbQCeJW9z
twONH5Eb9fA4JoQaYVk69os=
=6xti
-----END PGP SIGNATURE-----
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: thread switching time?

Jason Stone-3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I am using FreeBSD 7 and would like to decrease the time of switching
> between threads. This time seems to be 1ms and it is impossible to make
> lower delays inside a thread, at least using nanosleep().
>
> Is it possible to decrease this time to 1us?

Increase HZ, with the usual caveats about trading off latency for
overhead?


  -Jason

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: See https://private.idealab.com/public/jason/jason.gpg

iD8DBQFJCJ/FswXMWWtptckRAsdSAKCu2TF1LaqyR0JTuZX3oZD8S3H+cQCg8xoa
78qzo/mZ9klKhotTn4kJTkw=
=6fXj
-----END PGP SIGNATURE-----
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: thread switching time?

Krassimir Slavchev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jason Stone wrote:

>
>> I am using FreeBSD 7 and would like to decrease the time of switching
>> between threads. This time seems to be 1ms and it is impossible to
>> make lower delays inside a thread, at least using nanosleep().
>
>> Is it possible to decrease this time to 1us?
>
> Increase HZ, with the usual caveats about trading off latency for overhead?
>
>
>  -Jason
>

I have:
kern.clockrate: { hz = 4000, tick = 250, profhz = 4000, stathz = 129 }
but no difference.
Yes, overheads are lower and my application's performance is better but
thread switching time is same.
AFAIR I have read somewhere on the Internet about such problem when
playing multiple video files and the solution was to change some
parameters somewhere in header files but I cannot find this again.

Best Regards


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFJCWN+xJBWvpalMpkRAt+qAKCjoLVyUZdbf91nqrgSj0nOhiGOhQCfYaqv
IijZrwPCRYJmBUGHb2WI9IA=
=uv12
-----END PGP SIGNATURE-----
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"