[Devel] Re: [PATCH 6/13] BC: kmemsize accounting (core)

Pekka Enberg penberg at cs.helsinki.fi
Fri Nov 10 14:46:36 PST 2006


Hi,

On 11/9/06, Kirill Korotaev <dev at sw.ru> wrote:
> +#ifdef CONFIG_BEANCOUNTERS
> +#define BC_EXTRASIZE   sizeof(struct beancounter *)
> +static inline size_t slab_mgmt_size_noalign(int flags, size_t nr_objs)
> +{
> +       size_t size;
> +
> +       size = slab_mgmt_size_raw(nr_objs);
> +       if (flags & SLAB_BC)
> +               size = ALIGN(size, BC_EXTRASIZE) + nr_objs * BC_EXTRASIZE;
> +       return size;

Why do we want to track each allocated _object_ in the slab? Isn't
tracking pages enough?




More information about the Devel mailing list