All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] Re: [PATCH 14/21] net/s2io: replace schedule_timeout() with
Date: Mon, 17 Jan 2005 23:29:56 +0000	[thread overview]
Message-ID: <20050117232956.GV24698@us.ibm.com> (raw)
In-Reply-To: <200501172315.j0HNFAaH027053@guinness.s2io.com>

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On Mon, Jan 17, 2005 at 03:15:05PM -0800, Raghavendra Koushik wrote:
> Correct me if Iam wrong, but isn't HZ always defined as 
> "number of jiffies" on the machine that equals 1sec in duration. 
> So even if duration of jiffy varies, Macro HZ is assured to be 1 sec.
> This way schedule_timeout (HZ / 2) on any machine is supposed to 
> timeout after half a second and so on and so forth.

You are correct that timing out relative to HZ is ok. However, I would like to
remove this dependency wherever it exists. That way requesting a delay of
500 milliseconds can always be done via msleep() and if the behind-the-scenes
workings of schedule_timeout() change (for instance relative to tickless
systems), msleep() should still succeed.

There are some issues with the task states (more applicable to
TASK_INTERRUPTIBLE than TASK_UNINTERRUPTIBLE), but they are not relevant to your
code.

The patch really is more for consistency's sake. I don't want people to see your
driver and then assume they should use schedule_timeout() because someone else
has. msleep() is the preferred interface for longer unconditional delays. It
also makes it clearer that the sleep is for 500 msecs (e.g.) than HZ/2, IMO.

Thanks,
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

  reply	other threads:[~2005-01-17 23:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17 23:15 [KJ] RE: [PATCH 14/21] net/s2io: replace schedule_timeout() with Raghavendra Koushik
2005-01-17 23:29 ` Nishanth Aravamudan [this message]
2005-02-09 18:37 ` Ravinandan Arakali
2005-02-16 13:25 ` Domen Puncer
2005-02-16 14:31 ` Domen Puncer
2005-02-16 23:54 ` Ravinandan Arakali
2005-02-17  0:13 ` Nishanth Aravamudan
2005-02-17  0:24 ` Ravinandan Arakali

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=20050117232956.GV24698@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.