All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christer Weinigel <christer@weinigel.se>
To: root@chaos.analogic.com
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Willy Tarreau <willy@w.ods.org>, Jim Paris <jim@jtan.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Re: time() glitch on 2.4.18: solved
Date: 06 Nov 2002 16:09:26 +0100	[thread overview]
Message-ID: <87d6pienvd.fsf@zoo.weinigel.se> (raw)
In-Reply-To: <Pine.LNX.3.95.1021105153853.734C-100000@chaos.analogic.com>

"Richard B. Johnson" <root@chaos.analogic.com> writes:

> > On Tue, 2002-11-05 at 20:23, Richard B. Johnson wrote:
> > > Hey, look. I can only warn. You do what you want. As far as I'm
> > > concerned support stopped at Linux 2.4.19 when poll got trashed.
> > > Nobody can use 2.4.19 or probably anything later unless they have
> > > powerful CPUs that can spin with 1000 SIGPOLL signals per second.
> 
> Enable SIGPOLL on STDIN_FILENO and connect from the network as previously
> shown. You will get 100% CPU time on the task with this enabled.

Can you please stop harping about this?  You have written essentially
the same mail over and over again without adding any new information.

First of all, your problem has nothing to do with networking, the same
thing will happen if you run your program from within screen, so it
seems to have more to do with ptys and how both screen and telnetd
sets them up.  

Second, it seems that your program does exactly what is expected.  Try
applying this patch to your example program and see what happens:

diff -u ./polltest.c.orig ./polltest.c
--- ./polltest.c.orig	Wed Nov  6 15:36:09 2002
+++ ./polltest.c	Wed Nov  6 15:35:54 2002
@@ -47,7 +47,7 @@
 {
     struct pollfd pf;
     pf.fd = STDIN_FILENO;
-    pf.events = POLLIN;
+    pf.events = POLLIN | POLLOUT | POLLERR;
     pf.revents = 0;
     (void)poll(&pf, 1, 0);
     if(pf.revents & POLLIN)

Each time you print the "POLLOUT = 3 POLLERR = 0" message, you fill up
the write buffer, and each time the write queue empties you will get
another SIGIO.  Now, this may not be what you want, but it seems to be
entirely within specs.

If you remove the fprintf(stderr, "POLLOUT... from your signal handler
you will not see the same effect as you are complaining about.  Your
measurements are interfering with what you are trying to measure.

  /Christer

-- 
"Just how much can I get away with and still go to heaven?"

Freelance consultant specializing in device driver programming for Linux 
Christer Weinigel <christer@weinigel.se>  http://www.weinigel.se

  reply	other threads:[~2002-11-06 15:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-02  6:37 time() glitch on 2.4.18 at 177 days uptime? Jim Paris
2002-11-03 19:32 ` time() glitch on 2.4.18: solved Jim Paris
2002-11-03 20:30   ` Alan Cox
2002-11-05 16:30     ` [PATCH] " Jim Paris
2002-11-05 16:54       ` george anzinger
2002-11-05 17:10       ` Willy Tarreau
2002-11-05 18:16         ` Alan Cox
2002-11-05 18:02           ` Jim Paris
2002-11-05 18:37             ` Alan Cox
2002-11-05 18:20               ` Willy Tarreau
2002-11-05 18:50                 ` Jim Paris
2002-11-05 17:14       ` Willy Tarreau
2002-11-05 17:42         ` Jim Paris
2002-11-05 18:57           ` Richard B. Johnson
2002-11-05 19:08             ` Willy Tarreau
2002-11-05 19:29               ` Richard B. Johnson
2002-11-05 20:07                 ` Alan Cox
2002-11-05 20:14                   ` Willy Tarreau
2002-11-05 20:38                     ` Richard B. Johnson
2002-11-05 23:15                       ` Willy Tarreau
2002-11-06 12:47                         ` Richard B. Johnson
2002-11-06 13:25                           ` Alan Cox
2002-11-06 23:21                             ` Jim Paris
2002-11-05 20:23                   ` Richard B. Johnson
2002-11-05 20:57                     ` Alan Cox
2002-11-05 20:41                       ` Richard B. Johnson
2002-11-06 15:09                         ` Christer Weinigel [this message]
2002-11-06 15:49                           ` Richard B. Johnson
2002-11-05 20:06             ` Alan Cox
2002-11-05 17:32       ` Alan Cox

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=87d6pienvd.fsf@zoo.weinigel.se \
    --to=christer@weinigel.se \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jim@jtan.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    --cc=willy@w.ods.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.