From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] Re: [PATCH] irda/irtty-sir: replace
Date: Tue, 27 Jul 2004 18:15:02 +0000 [thread overview]
Message-ID: <20040727181502.GL2099@us.ibm.com> (raw)
In-Reply-To: <20040727175004.GA18782@bougret.hpl.hp.com>
[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]
On Tue, Jul 27, 2004 at 10:50:04AM -0700, Jean Tourrilhes wrote:
> On Tue, Jul 27, 2004 at 10:11:20AM -0700, Nishanth Aravamudan wrote:
> > I would appreciate any comments from the janitors list.
> >
> > Applys-to: 2.6.7
> >
> > Description: Replace schedule_timeout() with msleep() to guarantee the
> > task delays for the desired time.
>
> I'm forwarding that the Martin, which is the maintainer of
> that piece of code.
> I personally find the name of the msleep() function dangerous
> and confusing, and I would prefer not to use it as it is. Despite its
> very generic name, the msleep() function apply only when we are within
> a real process/task context. If you attempt to use it in interrupt, BH
> or timer context, you will get some very interesting results.
<snip>
> I would suggest renaming "msleep()" to "task_msleep()" or
> "schedule_msleep()" before applying this patch, so that things are
> clear. Or just make "task_msleep()" or "schedule_msleep()" a wrapper
> around "msleep()".
You make a valid point, but this is the way I see it:
Anything which has the word "sleep" in it should be suspicious and not
be called from interrupt context, unless one is certain this is a
misnaming. In this case, it is not, as the task *will* sleep. A "delay"
on the other hand, implies busy-waiting. Thus there is no problem with
using mdelay/udelay in any context, as the process does not sleep. Thus,
I don't really think the naming is all that confusing.
If anyone else has any input, I'd appreciate it.
-Nish
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2004-07-27 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-27 17:50 [Kernel-janitors] Re: [PATCH] irda/irtty-sir: replace Jean Tourrilhes
2004-07-27 18:15 ` Nishanth Aravamudan [this message]
2004-07-27 18:26 ` Greg KH
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=20040727181502.GL2099@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=kernel-janitors@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 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.