thank you for reply. However, I am not very sure to be
vary agree with you.
after assigned the calculated initial value for "i",
it is very close to the break value for the next while
loop, actually, it is only one loop at most, so "i"
never goes to be
i*size + L1_CACHE_ALIGN(base+i*extra) > wastage +
L1_CACHE_BYTES
so, we do not need change the line 399 of slab.c.
thanks,
chen
--- Marc-Christian Petersen <m.c.p@wolk-project.de>
wrote:
> 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, Marc> 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)
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-
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/
This archive was generated by hypermail 2b29 : Wed Jan 15 2003 - 22:00:25 EST