Skip to contentSkip to conversation

Gigabit Performance 2.4.19-preX - Excessive locks, calls, waits

DISCUSSION Andi Kleen 2 participants 2 messages Mar 4, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20020304001223.A29448@vger.timpanogas.org.suse.lists.linux.kernel

Andi Kleen

author
#1 lore raw
Quoted 5 lines · Jeff V. Merkey

/usr/src/linux/net/core/skbuff.c

//int sysctl_hot_list_len = 128;
int sysctl_hot_list_len = 1024; // bump this value up

The plan was to actually to get rid of the skb hot list. It was just a stop gap solution to get CPU local smp allocation before Linux had cpu local slab caches. The slab cache has been fixed and runs cpu local now too, so there should be no need for it anymore as the slab cache does essentially the same thing as the private hot list cache (maintaining linked lists of objects and unlinking them quickly on allocation and linking them again on free, all in O(1))

Quoted 2 lines

alloc_skb_frame with fixed 1514 + fragment list allocations, sysctl_hot_list_len = 1024.

Something is bogus with your profile data. Increasing sysctl_hot_list_len never changes the frequency with which kmalloc/kfree are called. All it does is to produce less calls to kmem_cache_alloc() for the skb head, but the skb data portion is always allocated using kmalloc(). Your new profile doesn't show kmalloc so you changed something else.

-andi

#2 lore raw
In reply to a message not in the archive
Quoted 20 lines · Andi Kleen
Quoted 5 lines · Jeff V. Merkey

/usr/src/linux/net/core/skbuff.c

//int sysctl_hot_list_len = 128;
int sysctl_hot_list_len = 1024; // bump this value up

The plan was to actually to get rid of the skb hot list. It was just a stop gap solution to get CPU local smp allocation before Linux had cpu local slab caches. The slab cache has been fixed and runs cpu local now too, so there should be no need for it anymore as the slab cache does essentially the same thing as the private hot list cache (maintaining linked lists of objects and unlinking them quickly on allocation and linking them again on free, all in O(1))

Quoted 2 lines

alloc_skb_frame with fixed 1514 + fragment list allocations, sysctl_hot_list_len = 1024.

Quoted 8 lines

Something is bogus with your profile data. Increasing sysctl_hot_list_len never changes the frequency with which kmalloc/kfree are called. All it does is to produce less calls to kmem_cache_alloc() for the skb head, but the skb data portion is always allocated using kmalloc(). Your new profile doesn't show kmalloc so you changed something else.

-andi

Agree. What's making the numbers get better is the fact I have removed calls to kmalloc/kfree in alloc_akb. This extra code path increases latency in these high speed adapters. Reread the post. I said changing the hot list eliminated a lot of packet overruns, not calls to kmalloc/kfree. The data is correct.

Jeff