netdev
[Top] [All Lists]

Re: route cache DoS testing and softirqs

To: Andrea Arcangeli <andrea@xxxxxxx>
Subject: Re: route cache DoS testing and softirqs
From: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>
Date: Thu, 1 Apr 2004 15:44:57 +0200
Cc: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>, Dipankar Sarma <dipankar@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxx>, kuznet@xxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, paulmck@xxxxxxxxxx, akpm@xxxxxxxx
In-reply-to: <20040331225259.GT2143@xxxxxxxxxxxxxxxxx>
References: <20040329222926.GF3808@xxxxxxxxxxxxxxxxx> <200403302005.AAA00466@xxxxxxxxxxxxxxx> <20040330211450.GI3808@xxxxxxxxxxxxxxxxx> <20040330133000.098761e2.davem@xxxxxxxxxx> <20040330213742.GL3808@xxxxxxxxxxxxxxxxx> <20040331171023.GA4543@xxxxxxxxxx> <16491.4593.718724.277551@xxxxxxxxxxxx> <20040331203750.GB4543@xxxxxxxxxx> <20040331212817.GQ2143@xxxxxxxxxxxxxxxxx> <16491.18384.536778.338660@xxxxxxxxxxxx> <20040331225259.GT2143@xxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
Andrea Arcangeli writes:

 > 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.

 How would softirq's scheduled be softirq's be run? 

 For a definitive solution a think Alexey analysis make sense:

 "All of them happening outside of ksoftirqd are equally bad, unaccountable,
 uncontrollable and will show up in some situation."

FYI. I did some more experiments:

Simple sycall test: user app = ank-time-loop (does gettimeofday in a loop)
=========================================================================
Before

total    droppped tsquz    throttl  bh_enbl  ksoftird irqexit  other   
00000099 00000000 00000000 00000000 0000005d 00000005 000163a2 00000000
00000008 00000000 00000000 00000000 00000009 00000000 000162f6 00000000

ank-time-loop 

After 10 sec. 
000000c0 00000000 00000000 00000000 0000005d 00000005 0001c3d2 00000000
00000008 00000000 00000000 00000000 00000009 00000000 0001c2f3 00000000

So syscalls "in this context" seems to do_softirq() via irqexit.

Route DoS while BGP tables are loading. ank-time-loop is running.
================================================================
total    droppped tsquz    throttl  bh_enbl  ksoftird irqexit  other   
000000c2 00000000 00000000 00000000 00000042 00000005 0001aef8 00000000
00000008 00000000 00000000 00000000 00000017 00000001 0001adba 00000000

After run:
000b3a10 00000000 00000eda 00000000 000006f6 0000052e 00041c06 00000000
000b0500 00000000 00000ec1 00000000 0000075e 00000197 000419f2 00000000

Most softirq's are run from irqexit but we see local_bh_enable is running
softirq's too. And only a minority of softirq's is running under scheduler 
control. As discussed we before with 100Hz timer we would expect lower 
rates from irqexit.

Cheers.
                                                --ro

 

<Prev in Thread] Current Thread [Next in Thread>