public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 10:09:48 -0400	[thread overview]
Message-ID: <416FDA2C.1080007@redhat.com> (raw)
In-Reply-To: <416FD4C0.3090403@drzeus.cx>

Pierre Ossman wrote:
> Neil Horman wrote:
> 
>> Pierre Ossman wrote:
> 
> 
>>> * 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.
> 
> 
> Being preempted by hard interrupts is sort of the point of moving the 
> stuff to a tasklet. Just as long as other tasklets and user space cannot 
> preempt it.
> 
> Are there any concerns when it comes to locking and tasklets? I've tried 
> finding kernel-locking-HOWTO referenced in kernel-docs.txt but the link 
> is dead and I can't find a mirror.
> 
Locking in tasklets needs to be done the same way locking in interrupt 
handlers is done.  The only caveat that I can think of is that in the 
event that you are accessing data shared with code that runs outisde of 
the tasklet, you probably need to use spin_lock_bh to disable softirqs 
in the latter code.  In your environment, it would typically replace the 
use of spin_lock_irq[save|restore].

HTH
Neil

> Rgds
> Pierre
> 


-- 
/***************************************************
  *Neil Horman
  *Software Engineer
  *Red Hat, Inc.
  *nhorman@redhat.com
  *gpg keyid: 1024D / 0x92A74FA1
  *http://pgp.mit.edu
  ***************************************************/

  reply	other threads:[~2004-10-15 14:14 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
2004-10-15 13:46   ` Pierre Ossman
2004-10-15 14:09     ` Neil Horman [this message]
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=416FDA2C.1080007@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox