From: Andrea Arcangeli <andrea@suse.de>
To: Dipankar Sarma <dipankar@in.ibm.com>
Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com,
Robert Olsson <Robert.Olsson@data.slu.se>,
"Paul E. McKenney" <paulmck@us.ibm.com>,
Dave Miller <davem@redhat.com>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Andrew Morton <akpm@osdl.org>
Subject: Re: route cache DoS testing and softirqs
Date: Tue, 30 Mar 2004 22:47:32 +0200 [thread overview]
Message-ID: <20040330204731.GG3808@dualathlon.random> (raw)
In-Reply-To: <20040330195315.GB3773@in.ibm.com>
On Wed, Mar 31, 2004 at 01:23:15AM +0530, Dipankar Sarma wrote:
> It doesn't look as if we are processing much from ksoftirqd at
> all in this case. I did the following instrumentation -
>
> if (in_interrupt() && local_softirqd_running())
> return;
> max_restart = MAX_SOFTIRQ_RESTART;
> local_irq_save(flags);
>
> if (rcu_trace) {
> int cpu = smp_processor_id();
> per_cpu(softirq_count, cpu)++;
> if (local_softirqd_running() && current == __get_cpu_var(ksoftirqd))
> per_cpu(ksoftirqd_count, cpu)++;
> else if (!in_interrupt())
> per_cpu(other_softirq_count, cpu)++;
> }
> pending = local_softirq_pending();
>
> A look at the softirq_count, ksoftirqd_count and other_softirq_count shows -
>
> CPU 0 : 638240 554 637686
> CPU 1 : 102316 1 102315
> CPU 2 : 675696 557 675139
> CPU 3 : 102305 0 102305
>
> So, it doesn't seem supprising that your ksoftirqd offloading didn't
> really help much. The softirq frequency and grace period graph
> looks pretty much same without that patch -
>
> http://lse.sourceforge.net/locking/rcu/rtcache/pktgen/andrea/cpu-softirq.png
>
> We are simply calling do_softirq() too much it seems and not letting
> other things run on the system. Perhaps we need to look at real
> throttling of softirqs ?
>
I see what's going on now, yes my patch cannot help. the workload is
simply generating too much hardirq load, and it's like if we don't use
softirq at all but that we process the packet inside the hardirq for
this matter. As far as RCU is concerned it's like if there a no softirq
at all but that we process everything in the hardirq.
so what you're looking after is a new feature then:
1) rate limit the hardirqs
2) rate limit only part of the irq load (i.e. the softirq, that's handy
since it's already splitted out) to scheduler-aware context (not
inside irq context anymore)
3) stop processing packets in irqs in the first place (NAPI or similar)
however I start to think they can be all wrong, and that rcu is simply
not suitable for purerely irq usages like this. w/o rcu there would be
no need of the scheduler keeping up with the irq load, and in some usage
I can imagine that it is a feature to prioritize heavily on the
irq load vs scheduler-aware context.
next prev parent reply other threads:[~2004-03-30 20:47 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 [this message]
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
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=20040330204731.GG3808@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).