From: Marko Rauhamaa <marko@pacujo.net>
To: kuznet@ms2.inr.ac.ru
Cc: linux-kernel@vger.kernel.org, hadi@cyberus.ca (Jamal Hadi Salim),
Robert.Olsson@data.slu.se (Robert Olsson)
Subject: Re: NAPI Race?
Date: 08 Oct 2003 14:17:31 -0700 [thread overview]
Message-ID: <m3ekxnzaxg.fsf@lumo.pacujo.net> (raw)
In-Reply-To: <200310081957.XAA01425@yakov.inr.ac.ru>
kuznet@ms2.inr.ac.ru:
> > interrupted for some other reason, the packet will get processed only at
> > the next jiffie when the soft irq is invoked again.
> >
> > Am I mistaken?
>
> Yes, you are wrong. It is processed as soon as possible.
If I receive a packet at the tail end of net_rx_action(), we will
schedule the softirq again. But do_softirq() explicitly refuses to run
the same softirq right away. The softirq will be invoked at the next
interrupt, timer tick, system call (?) or when ksoftirqd is scheduled.
It may happen that none of these events occur for milliseconds.
> > As an aside, it looks also as though the design might technically
> > allow the network driver to starve the CPU (the very situation NAPI
> > was designed to protect against).
>
> Nope. NAPI is not expected to cure starvation caused by softirqs.
Well, it almost does. You can blast a NAPI driver with a packet flood,
and the system is happy and responsive -- no interrupts are generated,
and packets are polled by ksoftirqd. However, you can find a packet rate
that will cause the CPU to spend virtually all of its time in NAPI.
Marko
--
Marko Rauhamaa mailto:marko@pacujo.net http://pacujo.net/marko/
next prev parent reply other threads:[~2003-10-08 21:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-08 3:07 Marko Rauhamaa
2003-10-08 11:34 ` P
2003-10-08 19:57 ` kuznet
2003-10-08 21:17 ` Marko Rauhamaa [this message]
2003-10-08 21:31 ` David S. Miller
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=m3ekxnzaxg.fsf@lumo.pacujo.net \
--to=marko@pacujo.net \
--cc=Robert.Olsson@data.slu.se \
--cc=hadi@cyberus.ca \
--cc=kuznet@ms2.inr.ac.ru \
--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
all inboxes | Powered by JetHome®