poll problem?

From: Karlis Peisenieks (karlis@mt.lv)
Date: Thu Oct 17 2002 - 04:32:00 EST


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?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:33 EST