Re: [PATCH v4 28/32] mm/slub: Simplify struct slab slabs field definition

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

 



On Tue, Jan 04, 2022 at 01:10:42AM +0100, Vlastimil Babka wrote:
> Before commit b47291ef02b0 ("mm, slub: change percpu partial accounting
> from objects to pages") we had to fit two integer fields into a native
> word size, so we used short int on 32-bit and int on 64-bit via #ifdef.
> After that commit there is only one integer field, so we can simply
> define it as int everywhere.
> 
> Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>
> ---
>  mm/slab.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/mm/slab.h b/mm/slab.h
> index b8da249f44f9..362832f465e6 100644
> --- a/mm/slab.h
> +++ b/mm/slab.h
> @@ -27,11 +27,7 @@ struct slab {
>  		struct rcu_head rcu_head;
>  		struct {
>  			struct slab *next;
> -#ifdef CONFIG_64BIT
>  			int slabs;	/* Nr of slabs left */
> -#else
> -			short int slabs;
> -#endif

Very nice!

Reviewed-by: Roman Gushchin <guro@xxxxxx>




[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