mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matti Aarnio <matti.aarnio@zmailer.org>
To: watermodem <aquamodem@ameritech.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Jiffy question and sound.
Date: Mon, 19 Mar 2001 11:46:15 +0200	[thread overview]
Message-ID: <20010319114615.E23336@mea-ext.zmailer.org> (raw)
In-Reply-To: <3AB5A53F.F8B0373B@ameritech.net>
In-Reply-To: <3AB5A53F.F8B0373B@ameritech.net>; from aquamodem@ameritech.net on Mon, Mar 19, 2001 at 12:20:47AM -0600

On Mon, Mar 19, 2001 at 12:20:47AM -0600, watermodem wrote:
> With the 2.4.0 kernel the loops_per_sec field was replaced (for i386)
> with current_cpu_data.loops_per_jiffy.
...
> #define LOOPS_PER_SEC current_cpu_data.loops_per_jiffy * 100

  The intention was to accomodate systems with faster than 2 GHz clock
  at which the LOOPS_PER_SEC counter spins around a bit too fast..
  ('signed long' at i386 handles 0..2G just fine, then it thinks the sign
   got inverted..  'unsigned long' works fine until 4 GHz processors.)

  Why does the ALSA need  LOOPS_PER_SEC ?
  Is it doing timing by busy-looping ?

> Now compiling the same  ALSA modules with 2.4.2 this problem happens
> much quicker and you don't need any other activity.  In fact it is hard
> to play more than half a song.  (MP3)
> It doesn't matter if what set of music players or tools I use the
> problem is quite visible.
> 
> When I boot back to the original 2.2.x kernel everything is perfect.   
> 
> So I guess I have a few questions here.
>  1)   Is a jiffy 100th of a second or is it smaller  (so my loop count
> is starving things.) (10ms) ?

	"HZ" is the answer.  E.g. Alpha has HZ=1024, while i386 has HZ=100
	Nearly all architectures have different values based on what some
	other UNIX uses at given system.

>  2)   Why is it so much worse in 2.4.2 than 2.4.0?
>  3)   Any other "gotch's" that are important to watch for when moving
> 2.2.x drivers to 2.4.x?

	The FAQ may have some pointers to "porting drivers to 2.4" documents.

> Thanks....
> Watermodem
> -
> Please read the FAQ at  http://www.tux.org/lkml/

/Matti Aarnio

  reply	other threads:[~2001-03-19  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-19  6:20 watermodem
2001-03-19  9:46 ` Matti Aarnio [this message]
2001-03-20  4:22   ` watermodem
2001-03-20  4:53     ` watermodem

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=20010319114615.E23336@mea-ext.zmailer.org \
    --to=matti.aarnio@zmailer.org \
    --cc=aquamodem@ameritech.net \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®