On Wednesday 08 January 2003 23:03, Shangc wrote:
Hi Shangc,
> --- slab.c=092003-02-08 04:26:50.000000000 -0500
> +++ slab.c=092003-02-08 04:26:14.000000000 -0500
> @@ -397,7 +397,7 @@
> =09=09base =3D sizeof(slab_t);
> =09=09extra =3D sizeof(kmem_bufctl_t);
> =09}
> -=09i =3D 0;
> +=09i =3D (wastage - base) / (size + extra);
> =09while (i*size + L1_CACHE_ALIGN(base+i*extra) <=3D> wastage)
> =09=09i++;
> =09if (i > 0)
if you use this you may also want this.
ciao, Marc
--------------Boundary-00=_WO1FUJ41H4WHHM5P7KTC
Content-Type: text/x-diff;
charset="iso-8859-1";
name="slab-other.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="slab-other.patch"
diff -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)
--------------Boundary-00=_WO1FUJ41H4WHHM5P7KTC--
-
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/