Messages in this thread |  | | Date | Fri, 28 Sep 2001 14:51:48 -0400 | From | Benjamin LaHaise <> | Subject | Re: [patch] softirq performance fixes, cleanups, 2.4.10. |
| |
On Fri, Sep 28, 2001 at 09:56:24PM +0400, kuznet@ms2.inr.ac.ru wrote: > > (Lets assume that a loop of 10 still ensures basic safety in situations > > where external load overloads the system. > > It does not, evidently. And 1 does not. But 10 is 10 times worse.
10 is not 10 times worse. The effect is much more subtle than that when you factor in the amount of work done as well as the cache state.
> Ingo, I told net_rx_action() is small do_softirq() restarting not 10, > but not less than 300 times in row.
The problem comes from net_rx_action doing less than the allowable amount of work if another rx interrupt comes in while softirqs were being run -- if the rx action is not repeated, the new packets are not acknowledged until 10's of ms later, which is a *lot* of data in the future. Running the logic via ksoftirqd alone results in a significant cache hit for just the context switch (our stack and task structs all map to the *SAME* L1 cache lines in many processors), which softirqs do not. Blanket disallowing repeats generates more overhead than it reduces overload: it makes things worse by increasing the amount of work that needs to be done during overload.
-ben - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |