Changeset 739 for trunk/server/items.c

Show
Ignore:
Timestamp:
03/03/08 05:08:31 (21 months ago)
Author:
dormando
Message:

Don't re-calculate the slab class id for slabs_free() either.
This + previous patch slightly reduce user CPU time, especially during heavy evictions.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/server/items.c

    r738 r739  
    145145void item_free(item *it) { 
    146146    size_t ntotal = ITEM_ntotal(it); 
     147    unsigned int clsid; 
    147148    assert((it->it_flags & ITEM_LINKED) == 0); 
    148149    assert(it != heads[it->slabs_clsid]); 
     
    151152 
    152153    /* so slab size changer can tell later if item is already free or not */ 
     154    clsid = it->slabs_clsid; 
    153155    it->slabs_clsid = 0; 
    154156    it->it_flags |= ITEM_SLABBED; 
    155157    DEBUG_REFCNT(it, 'F'); 
    156     slabs_free(it, ntotal); 
     158    slabs_free(it, ntotal, clsid); 
    157159} 
    158160