On Tuesday 17 October 2006 02:53, Eric Barton wrote: > If so, do you have any ideas about how to do it more economically? It's 2 > pointers rather than 1 to avoid forcing an unnecessary packet boundary > between successive zero-copy sends. But I guess that might not be hugely > significant since you're generally sending many pages when zero-copy is > needed for performance. Also, (please correct me if I'm wrong) I didn't > think this would push the allocation over to the next entry in > 'malloc_sizes'.
Well, skbuff heads are allocated from dedicated kmem_cache (skbuff_fclone_cache & skbuff_head_cache), and these caches are not constrained by the sizes available in malloc_sizes. Their size are a multiple of L1 CACHE size, which is 64 bytes for most common machines. Even if your two pointers addition (16 bytes on x86_64) doesnt cross a 64bytes line (I didn't checked), they are going to be set to NULL each time a skbuff is allocated , and checked against NULL each time a skbuff is destroyed. Eric - 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