linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcin 'Qrczak' Kowalczyk <qrczak@knm.org.pl>
To: linux-fsdevel@vger.kernel.org
Subject: Bug: epoll_wait timeout is shorter than requested
Date: Mon, 17 Jan 2005 12:15:06 +0100	[thread overview]
Message-ID: <87651wl32d.fsf@qrnik.zagroda> (raw)

A program to exhibit the bug:

----------------
#include <sys/epoll.h>
#include <sys/time.h>
#include <stdio.h>

int main(void) {
   int epoll_fd;
   struct timeval time1, time2;
   struct epoll_event event;
   epoll_fd = epoll_create(16);
   gettimeofday(&time1, NULL);
   epoll_wait(epoll_fd, &event, 1, 1000);
   //poll(NULL, 0, 1000);
   gettimeofday(&time2, NULL);
   printf("start: %d.%06d\n", time1.tv_sec, time1.tv_usec);
   printf("stop:  %d.%06d\n", time2.tv_sec, time2.tv_usec);
   return 0;
}
----------------

It should wait one second (at least). Example output on Linux-2.6.10:
start: 1105958820.439410
stop:  1105958821.438636

With poll used instead of epoll the timeout is OK:
start: 1105958827.975209
stop:  1105958828.975944

Is this list a good place to report this?

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

             reply	other threads:[~2005-01-17 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17 11:15 Marcin 'Qrczak' Kowalczyk [this message]
2005-01-17 11:48 ` Bug: epoll_wait timeout is shorter than requested Jamie Lokier
2005-01-17 13:41   ` Marcin 'Qrczak' Kowalczyk
2005-01-17 14:33     ` Jamie Lokier
2005-01-17 14:43       ` Jamie Lokier
2005-01-17 16:18       ` Marcin 'Qrczak' Kowalczyk
2005-01-17 16:48         ` Jamie Lokier
2005-01-18 23:27           ` Marcin 'Qrczak' Kowalczyk

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=87651wl32d.fsf@qrnik.zagroda \
    --to=qrczak@knm.org.pl \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).