Re: QUESTION: can netdev_alloc_skb() errors be reduced by tuning?
From: starlight
Date: Tue Jun 16 2009 - 11:36:38 EST
At 10:19 AM 6/16/2009 +0100, Mel Gorman wrote:
>Can you give an example of an allocation failure? Specifically, I want to
>see what sort of allocation it was and what order.
I think it's just the basic buffer allocation for
Ethernet frames arriving in the 'ixgbe' driver. Seems
like it's one allocation per frame. Per the original
message the allocations are made with the 'netdev_alloc_skb()'
kernel call. The function where this code appears is
named 'ixgbe_alloc_rx_buffers()' and the comment is
"Replace used receive buffers."
The code path in question does not generate an error. It just
increments the 'alloc_rx_buff_failed' counter for the ethX
device. In addition it appears that the frame is dropped
only if the PCIe hardware ring-queue associated with each
interface is full. So on the next interrupt the allocation
is retried and appears to be successful 99% of the time.
>For reliable protocols, an allocation failure should recover and the
>data get through but obviously there is a drop in network performance
>when this happens.
This is for a specialized high-volume UDP multicast application
where data loss of any kind is unacceptable.
>If the allocations are high-order and atomic, increasing min_free_kbytes
>can help, particularly in situations where there is a burst of network
>traffic. I won't know if they are atomic until I see an error message
>though.
Doesn't the use of 'netdev_alloc_skb()' kernel primitive
imply what the nature of the allocation is? I followed the
call graph down into "kmem" land, but it's a complex place
and so I abandoned the review.
My impression is that 'min_free_kbytes' relates mainly to systems
where significant paging pressure exists. The servers have zero
paging pressure and lots of free memory, though mostly in the
form of instantly discardable file data cache pages. In the
past disabling the program that generates the cache pressure
has had no effect on data loss, though I haven't tried it in
relation this specific issue.
Tried increasing a few /proc/slabinfo tuneable parameters today
and this appears to have fixed the issue so far today.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/