public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "jdow" <jdow@earthlink.net>
To: "linux-os \(Dick Johnson\)" <linux-os@analogic.com>,
	"Mark Hounschell" <markh@compro.net>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: HZ question
Date: Tue, 13 Sep 2005 13:13:41 -0700	[thread overview]
Message-ID: <02e201c5b89f$a3248e80$1925a8c0@Thing> (raw)
In-Reply-To: Pine.LNX.4.61.0509130919390.29445@chaos.analogic.com

From: "linux-os (Dick Johnson)" <linux-os@analogic.com>
>
> On Tue, 13 Sep 2005, Mark Hounschell wrote:
>
>> I need to know the kernels value of HZ in a userland app.
>>
>> getconf CLK_TCK
>>      and
>> hz = sysconf (_SC_CLK_TCK)
>>
>> both seem to return CLOCKS_PER_SEC which is defined as USER_HZ which is
>> defined as 100.
>>
>> include/asm/param.h:
>>
>> #ifdef __KERNEL__
>> # define HZ       1000   /* Internal kernel timer frequency */
>> # define USER_HZ  100    /* .. some user interfaces are in "ticks" */
>> # define CLOCKS_PER_SEC  (USER_HZ)       /* like times() */
>> #endif
>>
>> Thanks in advance for any help
>> Mark
>
> You are not supposed to 'tear apart' user-mode headers. In particular
> you are not supposed to use anything in /usr/include/bits, 
> /usr/include/asm,
> or /usr/include/linux in user-mode programs. These are not POSIX headers.
>
> Therefore, HZ is not something that is defined for user-mode programs.
> the ANSI spec requires that things like clock() return a value that
> can be divided by CLOCKS_PER_SEC to get CPU time. Nothing in user-mode
> uses HZ.  That's the reason why later versions of the kernel are
> able to use dynamic HZ.

That means Linux is not a suitable operating system for multimedia 
applications.
MIDI needs to schedule in 1 ms or smaller increments. The userland 
application
should be able to set this. It should be able to determine this. If it 
cannot
then it is useless. (It also explains why MIDI based applications are so
absolutely dreadful on Linux.)

{^_^}   Joanne Dow said that. 


  parent reply	other threads:[~2005-09-13 20:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 12:48 HZ question Mark Hounschell
2005-09-13 13:46 ` linux-os (Dick Johnson)
2005-09-13 14:00   ` Mark Hounschell
2005-09-13 14:20     ` Tim Schmielau
2005-09-13 15:05       ` Mark Hounschell
2005-09-13 16:01         ` Tim Schmielau
2005-09-13 16:41           ` Mark Hounschell
2005-09-13 16:47           ` Mark Hounschell
2005-09-13 18:38             ` Stefan Smietanowski
2005-09-13 19:17               ` Mark Hounschell
2005-09-13 23:19                 ` Daniel Barkalow
2005-09-13 17:34         ` john stultz
2005-09-13 19:15           ` Mark Hounschell
2005-09-14  4:15           ` George Anzinger
2005-09-13 20:13   ` jdow [this message]
2005-09-13 20:38     ` linux-os (Dick Johnson)
2005-09-15  1:29       ` Lee Revell
2005-09-13 14:07 ` Tim Schmielau
2005-09-14  4:00 ` Coywolf Qi Hunt
2005-09-15  1:20   ` Lee Revell
2005-09-15 16:16     ` Joe Bob Spamtest
2005-09-15 20:19       ` Valdis.Kletnieks
2005-09-15 20:34         ` Jesper Juhl

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='02e201c5b89f$a3248e80$1925a8c0@Thing' \
    --to=jdow@earthlink.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=markh@compro.net \
    /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