lkml.org 
[lkml]   [2002]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.39 kmem_cache bug
Ed Tomlinson wrote:
>
> - if (__kmem_cache_shrink(cachep)) {
> + /* remove any empty partial pages */
> + spin_lock_irq(&cachep->spinlock);
> + while (!cachep->growing) {
> + struct list_head *p;
> + slab_t *slabp;
> +

growing is guaranteed to be false - loop is not necessary.

Actually growing can be removed completely, it's never necessary,
neither with nor without kmem_cache_reap().

Ed, there are far more cleanups possible in slab.c than just going from
3 to 2 lists, but IMHO it's far to early to make the design decision for
2 lists.

Or wait: You want 2 lists? Ok, agreed.

free and partial ;-)

The full list is unnecessary, it's possible to replace it with a
counter. It also saves several cacheline accesses for the list_del() and
list_add() into the full list...

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.637 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site