netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Robert Olsson <Robert.Olsson@data.slu.se>
Cc: Dipankar Sarma <dipankar@in.ibm.com>,
	"David S. Miller" <davem@redhat.com>,
	kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org,
	netdev@oss.sgi.com, paulmck@us.ibm.com, akpm@osdl.org
Subject: Re: route cache DoS testing and softirqs
Date: Thu, 1 Apr 2004 00:52:59 +0200	[thread overview]
Message-ID: <20040331225259.GT2143@dualathlon.random> (raw)
In-Reply-To: <16491.18384.536778.338660@robur.slu.se>

On Thu, Apr 01, 2004 at 12:36:00AM +0200, Robert Olsson wrote:
> 
> Andrea Arcangeli writes:
> 
>  > Maybe the problem is simply that NAPI should be tuned more aggressively,
>  > it may have to poll for a longer time before giving up.
> 
>  It cannot poll much more... 20 Million packets were injected in total
>  there were 250 RX irq's. Most from my ssh sessions. There are some TX 
>  interrupts... it's another story

I didn't focus much on the irq count, but now that I look at it, it
looks like the biggest source of softirq in irq context is the timer
irq, not the network irq. That explains the problem and why NAPI
couldn't avoid the softirq load in irq context, NAPI avoids the network
irqs, but the softirqs keeps running in irq context.

So lowering HZ to 100 should mitigate the problem significantly.

But I feel like we should change the softirq code so that the irqexit
runs only the softirq setup by the current (or nested) irq handler. This
way the timer irq will stop executing the softirqs posted by the network
stack and it may very well fix the problem completely. This definitely
will help fairness too.

>  Packet flooding is just our way to generate load and kernel locking must 
>  work with and without irq's. As far as I understand the real problem is 
>  when do_softirq is run from irqexit etc.

yes, but it's run from the _timer_ irq as far as I can tell.  Changing
the softirq code so that the irqexit only processes softirqs posted in
the irq handlers should fix it.

>  If we tag the different do_softirq sources (look in my testpatch) we can 
>  control the softirqs better. For example; do_softirq's from irqexit etc 
>  could be given low a "max_restart" this to move processing to ksoftird 
>  maybe even dynamic.

max_restart is needed exactly to avoid irqexit load to be offloaded to
regular kernel context, so that's basically saying that we should
disable max_restart but that's not a good solution for some non-NAPI
workload.

  reply	other threads:[~2004-03-31 22:52 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 18:45 route cache DoS testing and softirqs Dipankar Sarma
2004-03-29 22:29 ` Andrea Arcangeli
2004-03-30  5:06   ` Srivatsa Vaddagiri
2004-03-30  5:35     ` Srivatsa Vaddagiri
2004-03-30 15:11       ` Andrea Arcangeli
2004-03-31  2:36     ` Rusty Russell
2004-03-30 14:43   ` Dipankar Sarma
2004-03-30 19:53     ` Dipankar Sarma
2004-03-30 20:47       ` Andrea Arcangeli
2004-03-30 21:06         ` Dipankar Sarma
2004-03-30 21:27           ` Andrea Arcangeli
2004-03-30 21:29         ` Robert Olsson
2004-03-31  7:36           ` Dipankar Sarma
2004-03-30 20:05   ` kuznet
2004-03-30 20:28     ` Dipankar Sarma
2004-04-01  6:00       ` kuznet
2004-03-30 21:14     ` Andrea Arcangeli
2004-03-30 21:30       ` David S. Miller
2004-03-30 21:37         ` Andrea Arcangeli
2004-03-30 22:22           ` David S. Miller
2004-03-30 22:49             ` Andrea Arcangeli
2004-03-31 20:46               ` Dipankar Sarma
2004-03-31 21:31                 ` Andrea Arcangeli
2004-03-31 21:52                   ` Dipankar Sarma
2004-03-30 22:33           ` Robert Olsson
2004-03-31 17:10           ` Dipankar Sarma
2004-03-31 18:46             ` Robert Olsson
2004-03-31 20:37               ` Dipankar Sarma
2004-03-31 21:28                 ` Andrea Arcangeli
2004-03-31 21:43                   ` Dipankar Sarma
2004-04-05 17:11                     ` Robert Olsson
2004-04-05 21:22                       ` Dipankar Sarma
2004-04-06 12:55                         ` Robert Olsson
2004-04-06 19:52                           ` Dipankar Sarma
2004-04-07 15:23                             ` Robert Olsson
2004-04-07 19:48                               ` Dipankar Sarma
2004-04-08 13:29                           ` kuznet
2004-04-08 14:07                             ` Robert Olsson
2004-03-31 22:36                   ` Robert Olsson
2004-03-31 22:52                     ` Andrea Arcangeli [this message]
2004-04-01  6:43                       ` kuznet
2004-04-01 13:16                         ` Andrea Arcangeli
2004-04-08 13:38                           ` kuznet
2004-04-01 13:44                       ` Robert Olsson

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=20040331225259.GT2143@dualathlon.random \
    --to=andrea@suse.de \
    --cc=Robert.Olsson@data.slu.se \
    --cc=akpm@osdl.org \
    --cc=davem@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=paulmck@us.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).