On Fri, 19 Aug 2005, Andi Kleen wrote:
> Ahh, okay. I'm pretty sure that SuSE did some changes (not sure what) to
> memory management.
I don't think so.
I could certainly be mistaken. The difference I saw was that suse kernels
recycle the same skb pointers back to our driver, and the redhat kernels
seem to march through a much larger range before the values repeat. This
is all observation based, so I may be completely wrong on this issue.
> the formula for the size that the current e1000 looks for is something
> like
>
> a = MTU roundup to next power of 2
> a += 2 (skb_reserve(NET_IP_ALIGN))
> a += 16 (skb_reserve 16 by __dev_alloc_skb)
>
> so, a = 2048 + 2 + 16, or 2066
> request (a) from slab, which does a power of 2 roundup
> so the skb comes from the 4k (single page) slab for standard mtu.
That's very suboptimal because you're wasting nearly 2k. It would
be better if you allocated 4k or exactly 2k
we have to give the full 2k to hardware, unfortunately. which means
mapping the full 2k. we do the skb reserve because of cache/alighment
effects which show a (big) hit in performance if we don't align the IP
header. Yes I know that dword unaligned DMA really hurts on some arches,
but thats why the arch can #def NET_IP_ALIGN 0.
if thats the case, then we're left asking the question, who uses that 16
bytes that are skb_reserved by __dev_alloc_skb???
Jesse
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html