Thanks, that looks a lot more complete. We discussed this on irc a bit, and
Andi Kleen pointed out that several years of hacking on skbs has probably
changed the layout significantly from the original intention of keeping all
the initializations to a cacheline or two. I also pointed out that it might
be worth looking at cache misses and perhaps adding a prefetch instruction
or two, especially during allocation when an skb will be used immediately.
Another point is to check the order of writes that gcc is generating to the
skb: if the writes are sequential, the cpu can combine them and make use of
the internal 64 bit bus to the cache. In combination with write buffers in
the cpu, that makes the writes in __kfree_skb almost free, but if the cache
lines are spread out or cold, that would explain the degredation you're
seeing. Cheers,
-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/