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/