From: Neil Horman <nhorman@redhat.com>
To: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Tasklet usage?
Date: Fri, 15 Oct 2004 09:32:39 -0400 [thread overview]
Message-ID: <416FD177.1050404@redhat.com> (raw)
In-Reply-To: <416FCD3E.8010605@drzeus.cx>
Pierre Ossman wrote:
> My driver needs to spend a lot of time inside the interrupt handler
> (draining a FIFO). I suspect this might cause problems blocking other
> interrupt handlers so I was thinking about moving this into a tasklet.
> Not being to familiar with tasklets, a few questions pop up.
>
> * Will a tasklet scheduled from the interrupt handler be executed as
> soon as interrupt handling is done?
I don't _think_ they are guaranteed to be executed immediately after the
interrupt handler top half is complete, but they will execute before
the next return to user space (read: they will complete before user
processes run again).
> * Can tasklets be preempted?
A tasklet can get preempted by a hard interrupt, but tasklets run in
interrupt context, so don't do anything in a tasklet that can call schedule.
> * If a tasklet gets scheduled while running, will it be executed once
> more? (Needed if I get another FIFO interrupt while the tasklet is just
> exiting).
>
IIRC, a tasklet will execute once for every time tasklet_schedule is called.
HTH
Neil
--
/***************************************************
*Neil Horman
*Software Engineer
*Red Hat, Inc.
*nhorman@redhat.com
*gpg keyid: 1024D / 0x92A74FA1
*http://pgp.mit.edu
***************************************************/
next prev parent reply other threads:[~2004-10-15 13:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-15 13:14 Tasklet usage? Pierre Ossman
2004-10-15 13:32 ` Neil Horman [this message]
2004-10-15 13:46 ` Pierre Ossman
2004-10-15 14:09 ` Neil Horman
2004-10-16 15:17 ` Pierre Ossman
2004-10-16 16:03 ` Roland Dreier
2004-10-16 16:36 ` Pierre Ossman
2004-10-16 17:51 ` Roland Dreier
[not found] <fa.dvqma04.n40gos@ifi.uio.no>
2004-10-16 1:46 ` Robert Hancock
[not found] <fa.hf0cjfr.n3qt2d@ifi.uio.no>
[not found] ` <fa.doac9ep.1ckig8r@ifi.uio.no>
2004-10-16 17:53 ` Robert Hancock
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=416FD177.1050404@redhat.com \
--to=nhorman@redhat.com \
--cc=drzeus-list@drzeus.cx \
--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 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.