lkml.org 
[lkml]   [2012]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2][RESEND] slab: avoid unnecessary touching of a partial slab
On Mon, 23 Jan 2012, Pekka Enberg wrote:

> > diff --git a/mm/slab.c b/mm/slab.c
> > index 82e0a0e..2d7a0f4 100644
> > --- a/mm/slab.c
> > +++ b/mm/slab.c
> > @@ -3121,11 +3121,10 @@ retry:
> > check_slabp(cachep, slabp);
> >
> > /* move slabp to correct slabp list: */
> > - list_del(&slabp->list);
> > if (slabp->free == BUFCTL_END)
> > - list_add(&slabp->list, &l3->slabs_full);
> > - else
> > - list_add(&slabp->list, &l3->slabs_partial);
> > + list_move(entry, &l3->slabs_full);
> > + else if (entry != l3->slabs_partial.next)

Why is the check for entry necessary? We are holding a lock that
prevents modifications to the list after all.

Just a list_move when the partial slab is drained seems to be sufficient.


\
 
 \ /
  Last update: 2012-01-23 15:51    [W:0.104 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site