linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Fix up riscom8 driver to use work queues instead of task queueing.
Date: Mon, 18 Aug 2003 14:44:03 -0400	[thread overview]
Message-ID: <20030818184403.GL24693@gtf.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0308181117540.5929-100000@home.osdl.org>

On Mon, Aug 18, 2003 at 11:21:07AM -0700, Linus Torvalds wrote:
> 
> On Mon, 18 Aug 2003, Jeff Garzik wrote:
> > 
> > Should we just make schedule_delayed_work(foo, 1) the default for a 
> > schedule_work() call?
> 
> Why? There are cases where you may really want to get the work done asap,
> so the regular "schedule_work()" is the right thing. While the "delayed"  

schedule_work() is _not_ for that.  As currently implemented, you have
no guarantees that your schedule_work()-initiated work will even
begin in this century.

Drivers are using schedule_work() to create process contexts where
they can sleep, potentially for many seconds.  On a single cpu
system, or a loaded SMP system, schedule_work() from one of the
drivers you converted could easily be delayed for 30 seconds or more.
schedule_work() is not a fast path.

If work needs to happen ASAP, then you really want to replace those
schedule_work() calls with schedule_tasklet() calls that do the
"must be done asap" work, and then schedule_work() the stuff that
requires process context...  So, too, I would have thought that
bottom-half completion routines mapped more directly to
schedule_tasklet() anyway.

	Jeff




  parent reply	other threads:[~2003-08-18 18:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200308181806.h7II6K6D014918@hera.kernel.org>
2003-08-18 18:09 ` Fix up riscom8 driver to use work queues instead of task queueing Jeff Garzik
2003-08-18 18:21   ` Linus Torvalds
2003-08-18 18:28     ` Russell King
2003-08-18 18:47       ` Linus Torvalds
2003-08-18 18:59         ` Russell King
2003-08-18 19:10           ` Linus Torvalds
2003-08-18 18:44     ` Jeff Garzik [this message]
2003-08-18 19:12       ` Linus Torvalds
2003-08-18 19:25         ` Jeff Garzik
2003-08-18 19:36           ` Linus Torvalds
2003-08-18 20:32             ` Andrew Morton
2003-08-18 21:24               ` Jeff Garzik

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=20030818184403.GL24693@gtf.org \
    --to=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).