From: Andreas Schwab <schwab@suse.de>
To: linux-os@analogic.com
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Possible spin-problem in nanosleep()
Date: Thu, 23 Jun 2005 14:33:52 +0200 [thread overview]
Message-ID: <jell516ymn.fsf@sykes.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0506230812160.15775@chaos.analogic.com> (Richard B. Johnson's message of "Thu, 23 Jun 2005 08:18:05 -0400 (EDT)")
"Richard B. Johnson" <linux-os@analogic.com> writes:
> nanosleep() appears to have a problem. It may be just an
> 'accounting' problem, but it isn't pretty. Code that used
> to use usleep() to spend most of it's time sleeping, used
> little or no CPU time as shown by `top`. The same code,
> converted to nanosleep() appears to spend a lot of CPU
> cycles spinning. The result is that `top` or similar
> programs show lots of wasted CPU time.
usleep() is just a wrapper around nanosleep(). Are you sure you got the
units right?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2005-06-23 12:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-23 12:18 Possible spin-problem in nanosleep() Richard B. Johnson
2005-06-23 12:33 ` Andreas Schwab [this message]
2005-06-23 12:46 ` Richard B. Johnson
2005-06-23 15:09 ` Richard B. Johnson
2005-06-23 21:42 ` Alan Cox
2005-06-24 11:42 ` Richard B. Johnson
2005-06-26 17:18 ` Alan Cox
2005-06-26 18:14 ` Mike Galbraith
[not found] <4iz0p-5fH-7@gated-at.bofh.it>
2005-06-23 23:39 ` Robert Hancock
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=jell516ymn.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@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.