From: Karlis Peisenieks <karlis@mt.lv>
To: linux-kernel@vger.kernel.org
Subject: poll problem?
Date: Thu, 17 Oct 2002 12:32:00 +0300 [thread overview]
Message-ID: <20021017123200.A5837@karlis.dev.mt.lv> (raw)
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
reply other threads:[~2002-10-17 9:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021017123200.A5837@karlis.dev.mt.lv \
--to=karlis@mt.lv \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox