From: Nicolas Bougues <nbougues@axialys.net>
To: "Richard B. Johnson" <root@chaos.analogic.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Problems with wait queues
Date: Wed, 26 Jun 2002 16:38:08 +0200 [thread overview]
Message-ID: <20020626143808.GA6812@kiwi> (raw)
In-Reply-To: <Pine.LNX.3.95.1020626100928.25416A-100000@chaos.analogic.com>
Richard,
On Wed, Jun 26, 2002 at 10:17:45AM -0400, Richard B. Johnson wrote:
>
> I am sure that you can have things look correct as well as run
> properly. However, you didn't show us the code.
It's quite large, and I didn't think I was "syntactically" wrong. But
the code is available, if somebody wants to have a look.
> You need to do something like:
>
> interruptible_sleep_on(&semaphore);
>
> while your wake-up occurs with:
>
> wake_up_interruptible(&semaphore);
>
That's what I do, although I use the wait_event_interruptible macro
instead of interruptible_sleep_on.
>
> Both ways (and others) will look fine with `top` and will sleep
> properly.
>
If we're talking about %CPU times, right. If we're talking loadavg,
no. As I said in my previous message, I think it's because my
wake_up_interruptible() is *always* triggered during the timer
interrupt, just before the scheduler runs (new data is available every
100th/sec).
I'm not sure, but I think that the loadavg is computed at the
beginning of each scheduler run, thus, my task always looks "running"
at this time, even though it just runs for a few microseconds each
time.
--
Nicolas Bougues
next prev parent reply other threads:[~2002-06-26 14:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-26 10:32 Problems with wait queues Nicolas Bougues
2002-06-26 10:52 ` Andries Brouwer
2002-06-26 14:00 ` Nicolas Bougues
2002-06-26 14:17 ` Richard B. Johnson
2002-06-26 14:38 ` Nicolas Bougues [this message]
2002-06-26 21:49 ` David Woodhouse
2002-06-27 11:44 ` Richard B. Johnson
2002-06-27 12:36 ` Oliver.Neukum
2002-06-27 13:17 ` David Woodhouse
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=20020626143808.GA6812@kiwi \
--to=nbougues@axialys.net \
--cc=linux-kernel@vger.kernel.org \
--cc=root@chaos.analogic.com \
/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.