All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Sorenson <frank@tuxrocks.com>
To: Dag Nygren <dag@newtech.fi>
Cc: Nish Aravamudan <nish.aravamudan@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: nanosleep with small value
Date: Thu, 17 Nov 2005 12:47:09 -0700	[thread overview]
Message-ID: <437CDE3D.90606@tuxrocks.com> (raw)
In-Reply-To: <20051117191119.15126.qmail@dag.newtech.fi>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dag Nygren wrote:
> But what is the point of having a nanosleep() in that case when you could do
> just fine with usleep() ?

I'd suggest looking into the kthrt patches (which incorporates ktimers
and John Stultz's timeofday patches):  http://www.tglx.de/projects/ktimers/

Running your program, here are some results (latest git tree with the
latest kthrt and timeofday patches):

shortest of 10 runs as non-root:
real    0m0.418s
user    0m0.000s
sys     0m0.003s

longest of 10 runs as non-root:
real    0m0.794s
user    0m0.000s
sys     0m0.002s

shortest of 10 runs as root:
real    0m0.066s
user    0m0.001s
sys     0m0.007s

longest of 10 runs as root:
real    0m0.325s
user    0m0.000s
sys     0m0.004s

Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDfN49aI0dwg4A47wRAoHxAKDTeMGGnv21qem2Ll+SG8x5q+pV7ACgpUiT
ru0P0KXOet7eNJhLYNRJvpk=
=7IFW
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2005-11-17 19:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <29495f1d0511171051q6088099drfe094817a01668e4@mail.gmail.com>
2005-11-17 19:11 ` nanosleep with small value Dag Nygren
2005-11-17 19:15   ` Randy.Dunlap
2005-11-17 19:17   ` Nish Aravamudan
2005-11-17 19:47   ` Frank Sorenson [this message]
2005-11-21  7:12     ` Dag Nygren
2005-11-17 20:25 Dag Nygren
  -- strict thread matches above, loose matches on Subject: below --
2005-11-17 16:30 Dag Nygren
2005-11-17 16:55 ` linux-os (Dick Johnson)
2005-11-17 17:32   ` Eric Piel
2005-11-17 17:12 ` Nish Aravamudan
2005-11-17 18:47   ` Dag Nygren

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=437CDE3D.90606@tuxrocks.com \
    --to=frank@tuxrocks.com \
    --cc=dag@newtech.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nish.aravamudan@gmail.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.