limiting IRQ load, irq-rewrite-2.4.11-B5
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Linus Torvalds
Now test it again with the disk interrupt being shared with the network card.
Doesn't happen? It sure does. [...]
yes, disk IRQs might be delayed in that case. Without this mechanizm there is a lockup.
Quoted 2 lines
Which is why I like the NAPI approach. If somebody overloads my network card, my USB camera doesn't stop working.
i agree that NAPI is a better approach. And IRQ overload does not happen on cards that have hardware-based irq mitigation support already. (and i should note that those cards will likely perform even faster with NAPI.)
Quoted 2 lines
I don't disagree with your patch as a last resort when all else fails, but I _do_ disagree with it as a network load limiter.
okay - i removed those parts already (kpolld) in today's patch. (It initially was an experiment to prove that this is the only problem we are facing under such loads.)
Ingo
Ingo, is it possible to provide an interface (optional interface) to drivers, so that they can decide how many interrupts are too much. Drivers who feel that they should go in for interrupt mitigation have the option of deciding to go for it.
Ofcourse, you could also have a ceiling on the maximun number of interrupts, but the ceiling should be user configurable (using sysctl or /proc), this would enable administrators to config their systems depending on what kind of devices (with shared interrupts or not) they have.
Just my 2cents,
Balbir
Quoted 27 lines · Ingo Molnar
Quoted 5 lines · Linus Torvalds
Now test it again with the disk interrupt being shared with the network card.
Doesn't happen? It sure does. [...]
yes, disk IRQs might be delayed in that case. Without this mechanizm there is a lockup.
Quoted 3 lines
Which is why I like the NAPI approach. If somebody overloads my network card, my USB camera doesn't stop working.
i agree that NAPI is a better approach. And IRQ overload does not happen on cards that have hardware-based irq mitigation support already. (and i should note that those cards will likely perform even faster with NAPI.)
Quoted 3 lines
I don't disagree with your patch as a last resort when all else fails, but I _do_ disagree with it as a network load limiter.
okay - i removed those parts already (kpolld) in today's patch. (It initially was an experiment to prove that this is the only problem we are facing under such loads.)
Quoted 8 lines
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[email protected] and delete this mail from your records.
----------------------------------------------------------------------------------------------------------------------
Quoted 2 lines · BALBIR SINGH
Ingo, is it possible to provide an interface (optional interface) to drivers, so that they can decide how many interrupts are too much.
well, it existed, and i can add it back - i dont have any strong feelings either.
Quoted 2 lines
Drivers who feel that they should go in for interrupt mitigation have the option of deciding to go for it.
in those cases the 'irq overload' code should not trigger. It's not the rate of interrupts that matters, it's the amount of time we spend in irq contexts. The code counts the number of times we 'interrupt and interrupt context'. Interrupting an irq-context is a sign of irq overload. The code goes into 'overload mode' (and disables that particular interrupt source for the rest of the current timer tick) only if more than 97% of all interrupts from that source 'interrupt and irq context'. (ie. irq load is really high.) As any statistical method it has some inaccuracy, but 'statistically' it gets things right.
Ingo
Sorry, if I missed something in the patch, but here is a question.
Shouldn't the interrupt mitigation be on a per CPU basis? What I mean is that if a particular CPU is hogged due to some interrupt, that interrupt should be mitigated on that particular CPU and not on all CPUs in the system. So, unless an interrupt ends up taking a lot of time on all CPUs it should still have a chance to do something.
This could probably help in distributing the interrupts more evenly and fairly on an SMP system or vice-versa.
Balbir
Quoted 23 lines · Ingo Molnar
Quoted 3 lines · BALBIR SINGH
Ingo, is it possible to provide an interface (optional interface) to drivers, so that they can decide how many interrupts are too much.
well, it existed, and i can add it back - i dont have any strong feelings either.
Quoted 3 lines
Drivers who feel that they should go in for interrupt mitigation have the option of deciding to go for it.
in those cases the 'irq overload' code should not trigger. It's not the rate of interrupts that matters, it's the amount of time we spend in irq contexts. The code counts the number of times we 'interrupt and interrupt context'. Interrupting an irq-context is a sign of irq overload. The code goes into 'overload mode' (and disables that particular interrupt source for the rest of the current timer tick) only if more than 97% of all interrupts from that source 'interrupt and irq context'. (ie. irq load is really high.) As any statistical method it has some inaccuracy, but 'statistically' it gets things right.
Quoted 3 lines
Ingo
----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[email protected] and delete this mail from your records.
----------------------------------------------------------------------------------------------------------------------
Quoted 1 line · BALBIR SINGH
Shouldn't the interrupt mitigation be on a per CPU basis? [...]
this was done by an earlier version of the patch, but it's wrong. An IRQ cannot arrive to multiple CPUs at once (well, normal device interrupts at least) - it will arrive either to some random CPU, or can be bound via /proc/irq/N/smp_affinity. (there are architectures that do soft-distribution of interrupts, but that can be considered pseudo-random)
But in both cases, it's the actual, per-irq IRQ load that matters. If one CPU is hogged by IRQ handlers that is not an issue - other CPUs can still take over the work. If *all* CPUs are hogged then the patch detects the overload.
Ingo
Ingo could you explain me one basic thing?
What the hell has the hardirq rate limit logic to do with softirqs?
(btw, I don't know why you call it irq-rewrite, you didn't rewrote anything, you just added a irq flood avoidance feature by lefting irq disabled when you detect an irq flood caming in)
hardirqs have nothing to do with softirqs. Softirq as their name suggest are a totally software thing, they're generated by software, incidentally for the network stack they're posted from hard irq handlers because network cards are irq driven, but that's just a special case (of course it is the common case), but it is not the general case.
Your hardirq rate limit logic that lefts the irq disabled for some time is certainly needed from a security standpoint to avoid DoS if untrusted users can generates a flood of irqs using some device, unless the devices provides a way to flow control the irq rate (which I understood most hardware that can generate a flood of irqs provides anyways).
as far I can tell any change to the softirq logic is completly orthogonal with the softirq changes. Changing both things together or seeing any connection between the two just shows a very limited network oriented view of the whole picture about the softirqs.
Now I'm not saying that I don't want to change anything in the softirq logic, for example the deschedule logic made lots of sense and I can see the benefit for users like the network stack.
Andrea