poll problem?
Hello!
While using poll with rather large timeouts I came across a "problem" with maximum timeout value that can be passed to poll. By reading manpage people can expect that maximum timeout they can specify is 2^31 ms or ~596 hours (here and on I assume i386). In reality maximum timeout is HZ dependent and value larger than max is treated the same as negative timeout ("infinite" as per manpage, MAX_SCHEDULE_TIMEOUT in HZ units in reality). With HZ == 100 this value is ~6 hours (MAX_SCHEDULE_TIMEOUT / 100). With HZ == 1000 this value is only ~35min!
And now questions:
- is this how it is supposed to be (then manpage should be fixed)?
- perhaps current approach of timeout calc should be changed so that for large (> MAX_SCHEDULE_TIMEOUT / HZ) timeout values some other method (not that precise, e.g. : timeout = (timeout / 1000) * HZ) should be used?
Karlis