linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* poll problem?
@ 2002-10-17  9:32 Karlis Peisenieks
  0 siblings, 0 replies; only message in thread
From: Karlis Peisenieks @ 2002-10-17  9:32 UTC (permalink / raw)
  To: linux-kernel


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-17  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-17  9:32 poll problem? Karlis Peisenieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).