All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: "Infante, Jon" <Jon.Infante@Emulex.Com>
Cc: 'Christoph Hellwig' <hch@infradead.org>,
	"Smart, James" <James.Smart@Emulex.Com>,
	"'linux-scsi@vger.kernel.org'" <linux-scsi@vger.kernel.org>
Subject: Re: DPC vs tasklet
Date: Thu, 20 May 2004 13:08:34 -0400	[thread overview]
Message-ID: <40ACE612.8020800@pobox.com> (raw)
In-Reply-To: <8D43EFD7CCBDB24980134BE078C227E704E37AEB@xcm.emulex.com>

Infante, Jon wrote:
> Christoph,
> 
> I was going to take your advice:
> "usage of tasklet itself is questionable, you probably want a kernel-thread"
> 
> and redo our driver bottom half discovery handler to use a DPC. I just
> wanted to get your opinion of why usage of a tasklet is questionable. Some
> of the LINUX documentation I've read states "tasklets are the preferred
> mechanism with which to implement your bottom half for a normal hardware
> device". I can see, as you stated, being in user context will help with
> things like allowing the use of GFP_KERNEL for memory allocations or safe
> calling of del_timer_sync(); but its not real clear to me what all the
> tradeoffs are and why some people think tasklets are the preferred
> mechanism. Can you shed some more light on this or direct me to some URLs
> with more info.


There are tradeoffs.  Using a kernel thread increases latency, and is 
not always the best choice.

It really depends on how much "work" you need to do in the interrupt 
handling and bottom-half phases.

If we are talking per-irq or per-IO, kernel thread is a poor choice.

	Jeff




  parent reply	other threads:[~2004-05-20 17:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20 16:52 DPC vs tasklet Infante, Jon
2004-05-20 17:03 ` 'Christoph Hellwig'
2004-05-20 17:08 ` Jeff Garzik [this message]
2004-05-21  0:36   ` Bryan Henderson
2004-05-21  0:39     ` Matthew Wilcox
2004-05-21  7:46     ` Arjan van de Ven
2004-05-20 17:20 ` Arjan van de Ven
2004-05-20 17:57   ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2004-05-20 18:14 Infante, Jon

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=40ACE612.8020800@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=James.Smart@Emulex.Com \
    --cc=Jon.Infante@Emulex.Com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@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.