Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: perex@suse.cz, alsa-devel@alsa-project.org,
	kernel-janitors@lists.osdl.org
Subject: Re: [PATCH 30/39] sound/vx_core: replace schedule_timeout() with msleep()
Date: Mon, 24 Jan 2005 15:10:23 +0100	[thread overview]
Message-ID: <s5hmzuy2a0g.wl@alsa2.suse.de> (raw)
In-Reply-To: <20050121194731.GK3340@us.ibm.com>

At Fri, 21 Jan 2005 11:47:31 -0800,
Nishanth Aravamudan wrote:
> 
> Hi,
> 
> Please consider applying.
> 
> Description: Use msleep() instead of schedule_timeout() to guarantee the task
> delays as expected. The check for xmsec >= 1000 / HZ seems wrong to me, as well,
> since if HZ==100, that means we could mdelay() for 9 msecs!

Yes, and that's intentional.  Originally there were places to call
like snd_vx_delay(1) for just 1 or 2 ms in a long loop.  The loop
calls schedule() occasionally to take control back.
So, we didn't want to do schedule_timeout(1) for HZ=100 in such a
case.  This results in 10 times longer loop execution.

>  msleep() should be
> usable in all cases when not in an interrupt handler.

I agree in general, but, msleep() isn't always a replacement of
mdelay() if the delay time really matters.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

       reply	other threads:[~2005-01-24 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050121194731.GK3340@us.ibm.com>
2005-01-24 14:10 ` Takashi Iwai [this message]
2005-01-21 19:47 [PATCH 30/39] sound/vx_core: replace schedule_timeout() with msleep() Nishanth Aravamudan

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=s5hmzuy2a0g.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=nacc@us.ibm.com \
    --cc=perex@suse.cz \
    /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