lkml.org 
[lkml]   [2003]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] mm/slab.c, kernel <2.4.20>
Date
On Wednesday 08 January 2003 23:03, Shangc wrote:

Hi Shangc,

> --- slab.c 2003-02-08 04:26:50.000000000 -0500
> +++ slab.c 2003-02-08 04:26:14.000000000 -0500
> @@ -397,7 +397,7 @@
> base = sizeof(slab_t);
> extra = sizeof(kmem_bufctl_t);
> }
> - i = 0;
> + i = (wastage - base) / (size + extra);
> while (i*size + L1_CACHE_ALIGN(base+i*extra) <=> wastage)
> i++;
> if (i > 0)
if you use this you may also want this.

ciao, Marcdiff -Naurp a/mm/slab.c b/mm/slab.c
--- a/mm/slab.c Wed Jul 17 12:25:04 2002
+++ b/mm/slab.c Wed Jul 17 12:25:04 2002
@@ -399,10 +399,10 @@
base = sizeof(slab_t);
extra = sizeof(kmem_bufctl_t);
}
- i = 0;
+ i = (wastage - base)/(size + extra);
while (i*size + L1_CACHE_ALIGN(base+i*extra) <= wastage)
i++;
- if (i > 0)
+ while (i*size + L1_CACHE_ALIGN(base+i*extra) > wastage)
i--;

if (i > SLAB_LIMIT)
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.013 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site