Pasi Sjoholm writes:
> Hur är läget Robert?-)
Tack bra!
> > In summary: High softirq loads can totally kill userland. The reason is
> > that
> > do_softirq() is run from many places hard interrupts, local_bh_enable etc
> > and bypasses the ksoftirqd protection. It just been discussed at OLS with
> > Andrea and Dipankar and others. Current RCU suffers from this problem as
> > well.
>
> Ok, this explanation makes sense and my point of view I think this is
> quite critical problem if you can "crash" linux kernel just sending enough
> packets to network interface for an example.
Well the packets also has to create hard softirq loads in practice this means
route
lookup or something else for normal traffic the RX_SOFIRQ is very well behaved
and schedules itself to give other softirq's a chance to run also I'll guess
you
have softirq's not only from the network. If you decrease your load a bit you
come
to more nomal operation?
> I would be more than glad to help you in testing if you want to publish
> some patches.
Well maybe we should start to verify that this problem. Alexey did a litte
program
doing gettimeofday to run to see how long user mode could be starved. Also
note we
add new source of softirq's.
#include <stdio.h>
#include <sys/time.h>
#include <asm/types.h>
main()
{
struct timeval tv, prev_tv;
__s64 diff;
__u32 i;
__s32 maxlat = 50;
gettimeofday(&prev_tv, NULL);
printf("time control loop starting\n");
for (i=0;;i++) {
gettimeofday(&tv, NULL);
diff = (tv.tv_sec - prev_tv.tv_sec)*1000000 +
(tv.tv_usec - prev_tv.tv_usec);
if (diff > 1000000)
printf("**%lld\n", diff);
prev_tv = tv;
if (diff > maxlat) {
maxlat = diff;
printf("new maxlat = %d\n", maxlat);
}
if(!(i % 1000000))
printf("timestamp diff = %lld, maxlat = %d\n", diff,
maxlat);
}
}
Cheers.
--ro
|