[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1201231521340.11844@tux.localdomain>
Date: Mon, 23 Jan 2012 15:22:33 +0200 (EET)
From: Pekka Enberg <penberg@...nel.org>
To: Zhao Jin <cronozhj@...il.com>
cc: cl@...ux-foundation.org, mpm@...enic.com, rientjes@...gle.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2][RESEND] slab: avoid unnecessary touching of a partial
slab
[ Replying to an old patch that I seem to have missed. ]
On Sat, 27 Aug 2011, Zhao Jin wrote:
> In cache_alloc_refill(), after refilling from a partial slab, if the
> slab remains partial, it would be deleted from and then added again to
> the partial list. As the slab is the first element in the list before
> deletion, such behavior has no effect. This patch avoids touching the
> slab in this case.
>
> Signed-off-by: Zhao Jin <cronozhj@...il.com>
Looks good to me, Christoph, David?
> ---
> mm/slab.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> 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)
> + list_move(entry, &l3->slabs_partial);
> }
>
> must_grow:
> --
> 1.7.4.1
>
>
Powered by blists - more mailing lists