Re: [PATCH] slab: Clean up the code comment in slab kmem_cache struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 3 Jun 2018, Baoquan He wrote:

> diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
> index d9228e4d0320..3485c58cfd1c 100644
> --- a/include/linux/slab_def.h
> +++ b/include/linux/slab_def.h
> @@ -67,9 +67,10 @@ struct kmem_cache {
>
>  	/*
>  	 * If debugging is enabled, then the allocator can add additional
> -	 * fields and/or padding to every object. size contains the total
> -	 * object size including these internal fields, the following two
> -	 * variables contain the offset to the user object and its size.
> +	 * fields and/or padding to every object. 'size' contains the total
> +	 * object size including these internal fields, while 'obj_offset'
> +	 * and 'object_size' contain the offset to the user object and its
> +	 * size.
>  	 */
>  	int obj_offset;
>  #endif /* CONFIG_DEBUG_SLAB */
>

Wish we had some more consistent naming. object_size and obj_offset??? And
the fields better be as close together as possible.


Acked-by: Christoph Lameter <cl@xxxxxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux