From Manfred Spraul
If an object is freed from a slab, then move the slab to the tail of
the partial list - this should increase the probability that the other
objects from the same page are freed, too, and that a page can be
returned to gfp later.
In other words: if we just freed an object from this page then make
this page be the *last* page which is eligible for new allocations.
Under the assumption that other objects in that same page are about to
be freed up as well.
The cpu arrays are now always in front of the list, i.e. cache hit
rates should not matter.
} else if (unlikely(inuse == cachep->num)) {
/* Was full. */
list_del(&slabp->list);
- list_add(&slabp->list, &cachep->slabs_partial);
+ list_add_tail(&slabp->list, &cachep->slabs_partial);
}
}
}