lkml.org 
[lkml]   [2011]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] slab: avoid unnecessary touching of a partial slab
From
Sorry, one line in this patch does not conform to the coding style of
kernel source code. Here is the corrected version:

---
mm/slab.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 6d90a09..0c7a212 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3121,11 +3121,13 @@ retry:
check_slabp(cachep, slabp);

/* move slabp to correct slabp list: */
- list_del(&slabp->list);
- if (slabp->free == BUFCTL_END)
+ if (slabp->free == BUFCTL_END) {
+ list_del(&slabp->list);
list_add(&slabp->list, &l3->slabs_full);
- else
+ } else if (&slabp->list != l3->slabs_partial.next) {
+ list_del(&slabp->list);
list_add(&slabp->list, &l3->slabs_partial);
+ }
}

must_grow:
--
1.7.4.1

\
 
 \ /
  Last update: 2011-08-26 08:01    [W:0.057 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site