[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] Rework CACHE to use a FreeList
On 19/08/2022 11:15, Owen Smith wrote: The slab allocation method will allogate about a PAGE worth of objects, and every object will be initialized. If the objects initializer allocates any resources, this can result in resource starvation. A particular bad example of this is the grant table cache, where a page of gnttab objects is 253 objects. This is highlighted by xenvif's queues, where the receiver requires 257 grant references (1 for the ring, and 256 for the ring slots) which results in 2 slabs, or 506 gnttab objects, reserving 506 grant references. Use a FreeList to contain individual objects that are not in use. This trades an increase in smaller allocations for reducing the wastage of unused objects. Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> Sorry I didn't comment on the RFC; I was on PTO and then snowed under with mail etc. I think this is a sledgehammer to crack a nut. I agree that XENVIF is being a grant ref hog... but the correct thing to do there is to re-work the grant table cache, not the underlying slab allocator; which I think is fine. The problem is (ab)using the slab allocator's Ctor to get the reference. So a free list implementation is fine... just in the gnttab code, rather than the cache code. Paul
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |