mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: "Luis R. Rodriguez" <mcgrof@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Michael Buesch <mb@bu3sch.de>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Matt Smith <Matt.Smith@atheros.com>,
	Kevin Hayes <kevin@atheros.com>,
	Bob Copeland <me@bobcopeland.com>, Jouni Malinen <j@w1.fi>,
	Ivan Seskar <Seskar@winlab.rutgers.edu>,
	ic.felix@gmail.com, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Stop using tasklets for bottom halves
Date: Tue, 08 Sep 2009 13:27:18 -0400	[thread overview]
Message-ID: <1252430838.5493.5.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20090908100144.6e06872b@nehalam>

[ added Thomas Gleixner to Cc]

On Tue, 2009-09-08 at 10:01 -0700, Stephen Hemminger wrote:
> On Tue, 08 Sep 2009 12:40:23 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > On Tue, 2009-09-08 at 09:11 -0700, Stephen Hemminger wrote:
> > 
> > > > > Process context is too slow.
> > > > 
> > > > Well, I'm hoping to prove the opposite. I'm working on some stuff that I
> > > > plan to present at Linux Plumbers. I've been too distracted by other
> > > > things, but hopefully I'll have some good numbers to present by then.
> > > > 
> > > 
> > > 
> > > That's great, does it keep the good properties of NAPI (irq disabling
> > > and throttling?)
> > 
> > Not exactly sure what you mean by throttling, but I'm assuming it will.
> > 
> > As for irqs disabling, I'm trying to avoid doing that. Note, the device
> > will have its interrupts disabled, but not all other devices will.
> > 
> > -- Steve
> > 
> > 
> 
> The way NAPI works is that in irq routine, the device disables interrupts
> then schedules processing packets, when processing is done irq's are re-enabled.
> This means that if machine is being flooded, irq's stay off, and the packets
> get discarded (because device hardware ring is full), rather than in software
> (because software receive queue is full).

That sounds exactly like what threaded IRQs will do. When an interrupt
comes in, the device driver will disable the device interrupts, and then
the device irq thread handler is awoken.

The device irq handler will handle all the packets. If new packets come
in, and the hardware ring buffer is full, those packets will be dropped.
When the irq handler thread is done processing all pending packets, it
will re-enable the device's interrupts and go to sleep.

Yeah, looking at the NAPI code, it does seem to follow what threaded
interrupts do.

-- Steve



  reply	other threads:[~2009-09-08 17:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-07 22:58 Luis R. Rodriguez
2009-09-08  0:14 ` Stephen Hemminger
2009-09-08  2:17   ` Steven Rostedt
2009-09-08  4:16     ` Luis R. Rodriguez
2009-09-08 13:18       ` Steven Rostedt
2009-09-08  4:50     ` Michael Buesch
2009-09-08  5:08       ` Michael Buesch
2009-09-08  7:10       ` Ingo Molnar
2009-09-08 16:11     ` Stephen Hemminger
2009-09-08 16:40       ` Steven Rostedt
2009-09-08 17:01         ` Stephen Hemminger
2009-09-08 17:27           ` Steven Rostedt [this message]
2009-09-08 16:12     ` Stephen Hemminger

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=1252430838.5493.5.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=Matt.Smith@atheros.com \
    --cc=Seskar@winlab.rutgers.edu \
    --cc=ic.felix@gmail.com \
    --cc=j@w1.fi \
    --cc=kevin@atheros.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    --cc=mcgrof@gmail.com \
    --cc=me@bobcopeland.com \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®