Pavel Machek wrote:
Hi!
I'll probably regret getting into this discussion, but:
Or Alan's suggested revival
of the old code to drop non-critical network patches in duress.
Dropping non-critical packets is still in our plan, but I don't think that
is a FULL solution. As we mentioned before on that topic, you can't tell
if a packet is critical until AFTER you receive it, by which point it has
already had an skbuff (hopefully) allocated for it. If your network
traffic is coming in faster than you can receive, examine, and drop
non-critical packets you're hosed.
Why? You run out of atomic memory, start dropping the packets before
they even enter the kernel memory, and process backlog in the
meantime. Other hosts realize you are dropping packets and slow down,
or, if they are malicious, you just end up consistently dropping 70%
of packets. But that's okay.
I still think some sort of reserve pool
is necessary to give the networking stack a little breathing room when
under both memory pressure and network load.
"Lets throw some memory there and hope it does some good?" Eek? What
about auditing/fixing the networking stack, instead?
The other reason we need a separate critical pool is to satifsy critical
GFP_KERNEL allocations
when we are in emergency. These are made in the send side and we cannot
block/sleep.
* this doesn't really solve the problem (network can still starve)
Only if the pool is not large enough. One can argue that sizing the pool
appropriately is impossible (theoretical incoming traffic over a GigE card
or two for a minute or two is extremely large), but then I guess we
shouldn't even try to fix the problem...?
And what problem are you trying to fix, anyway? Last time I asked I
got reply around some strange clustering solution that absolutely has
to survive two minutes. And no, your patches do not even solve that,
because sizing the pool is impossible.
Yes, it is true that sizing the critical pool may be difficult if we use
it for all incoming allocations.
May be as an initial solution we could just depend on dropping
non-critical incoming packets
and use the critical pool only for outgoing allocations. We could
definitely size the pool if we use
it only for allocations for critical outgoing packets.
Thanks
Sridhar
-
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/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]