RE: [Lse-tech] [RFC] per cpu slab fix to reduce freemiss

Mala Anand
2002-07-30T12:32:44Z

>Tony Luck writes ..
>You don't specify any details of how the "singly linked list of
>free objects" would be implemented. You cannot use any of the
>memory in the freed object (as the constructor for a slab is only
>called when memory is first allocated, not when an object is recycled)
>so using any part of the object might confuse a caller by giving them
>a corrupted object.
I am creating a link list of free objects per cpu. When objects are
deallocated by the caller they get added to its cpu free object link
list. The freed objects do not migrate to other caches, they are put
back to the present cpu's link list. so they don't have to be
re-initialized. I am planning on putting a (configurable) limit on
the number of free objects that can stay in a free list.

>Are you going to have some external structure to maintain the linked
>list? Or secretly enlarge the object to provide space for the link,
>or some other way?
No I am using the object(beginning space) to store the links. When
allocated, I can initialize the space occupied by the link address.

Regards,
Mala

Mala Anand
IBM Linux Technology Center - Kernel Performance
E-mail:manand@us.ibm.com
Phone:838-8088; Tie-line:678-8088