public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Kirby <sim@netnation.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrea Arcangeli <andrea@suse.de>,
	linux-kernel@vger.kernel.org,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Subject: Re: [patch] softirq-2.4.10-B2
Date: Fri, 28 Sep 2001 11:36:48 -0700	[thread overview]
Message-ID: <20010928113648.A21266@netnation.com> (raw)
In-Reply-To: <20010928013106.W14277@athlon.random> <Pine.LNX.4.33.0109280716040.1569-200000@localhost.localdomain>
In-Reply-To: <Pine.LNX.4.33.0109280716040.1569-200000@localhost.localdomain>

On Fri, Sep 28, 2001 at 09:18:17AM +0200, Ingo Molnar wrote:

> basically the problem is that there is a big 'gap' between the activation
> of softirqs, and the time when ksoftirqd starts running. There are a
> number of mechanisms within the networking stack that are quite
> timing-sensitive. And generally, if there is work A and work B that are
> related, and we've executed work A (the hardware interrupt), then it's
> almost always the best idea to execute work B as soon as possible. Any
> 'delaying' of work B should only be done for non-performance reasons:
> eg. fairness in this case. Now it's MAX_SOFTIRQ_RESTART that balances
> performance against fairness. (in most kernel subsystems we almost always
> give preference to performance over fairness - without ignoring fairness
> of course.)

This may be somewhat related to something I've been thinking about
lately: The fact that most machines will choke under a simple UDP
while(1) sendto() attack (eg: around 100Mbit wire speed with lots of small
packets).  It seems that what's happening is a new packet comes in
immediately after the last interrupt is serviced (because the packets are
so small), so the CPU has no time to execute anything else and goes right
back into the interrupt handler.  This starves userspace CPU time.

Would your changes affect this at all?  It would be nice if this could
somehow be batched so that a Linux router could be capable of handling
large amounts of traffic with small packets, and wouldn't choke when lots
of small packets (most commonly from a TCP SYN bomb) go through it.

Actually, I just tested my while(1) sendto() UDP spamming program on an
Acenic card and noticed that it seems to do some sort of batching /
grouping, because the number of interrupts reported by vmstat is only
8,000 while it's easily 75,000 on other eepro100 boxes.  Interesting...

Simon-

[  Stormix Technologies Inc.  ][  NetNation Communications Inc. ]
[       sim@stormix.com       ][       sim@netnation.com        ]
[ Opinions expressed are not necessarily those of my employers. ]

  parent reply	other threads:[~2001-09-28 18:36 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-26 16:44 [patch] softirq performance fixes, cleanups, 2.4.10 Ingo Molnar
2001-09-26 17:48 ` Mike Kravetz
2001-09-26 18:48   ` Ingo Molnar
2001-09-26 18:55 ` Russell King
2001-09-26 19:14   ` Ingo Molnar
2001-09-27 23:31 ` Andrea Arcangeli
2001-09-28  3:20   ` Andrea Arcangeli
2001-09-28  7:34     ` Ingo Molnar
2001-09-28 15:17       ` Andrea Arcangeli
2001-09-28  7:18   ` [patch] softirq-2.4.10-B2 Ingo Molnar
2001-09-28 15:58     ` Andrea Arcangeli
2001-09-28 18:36     ` Simon Kirby [this message]
2001-09-28 18:47       ` Ingo Molnar
2001-09-28 19:31         ` kuznet
2001-09-28 16:18 ` [patch] softirq performance fixes, cleanups, 2.4.10 kuznet
2001-09-28 16:31   ` Ingo Molnar
2001-09-28 17:04     ` kuznet
2001-09-28 17:21       ` Rik van Riel
2001-09-28 17:31         ` Andrea Arcangeli
2001-09-28 17:41         ` kuznet
2001-09-28 17:46           ` Ingo Molnar
2001-09-28 18:39         ` Josh MacDonald
2001-09-28 17:31       ` Ingo Molnar
2001-09-28 17:56         ` kuznet
2001-09-28 18:28           ` Ingo Molnar
2001-09-28 19:23             ` kuznet
2001-09-28 19:48               ` Ingo Molnar
2001-09-29 16:35                 ` kuznet
2001-09-30  9:37                   ` Kai Henningsen
2001-09-30  9:01               ` Ingo Molnar
2001-09-28 19:39             ` kuznet
2001-09-28 20:03               ` Ingo Molnar
2001-09-28 18:51           ` Benjamin LaHaise
2001-09-28 16:32   ` Andrea Arcangeli
2001-09-28 16:46     ` Ingo Molnar
2001-09-28 16:58       ` Andrea Arcangeli
2001-09-28 16:35   ` [patch] softirq-2.4.10-B3 Ingo Molnar
2001-09-29  0:40     ` J . A . Magallon
2001-09-29 11:03   ` [patch] softirq performance fixes, cleanups, 2.4.10 Rusty Russell

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=20010928113648.A21266@netnation.com \
    --to=sim@netnation.com \
    --cc=andrea@suse.de \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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