Re: [PATCH v3 05/14] mm: Move 'private' union within struct page

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

 



On Wed, 18 Apr 2018, Matthew Wilcox wrote:

> @@ -95,6 +89,30 @@ struct page {
>  		/* page_deferred_list().prev	-- second tail page */
>  	};
>
> +	union {
> +		/*
> +		 * Mapping-private opaque data:
> +		 * Usually used for buffer_heads if PagePrivate
> +		 * Used for swp_entry_t if PageSwapCache
> +		 * Indicates order in the buddy system if PageBuddy
> +		 */
> +		unsigned long private;
> +#if USE_SPLIT_PTE_PTLOCKS
> +#if ALLOC_SPLIT_PTLOCKS
> +		spinlock_t *ptl;
> +#else
> +		spinlock_t ptl;

^^^^ This used to be defined at the end of the struct so that you could
have larger structs for spinlocks here (debugging and some such thing).

Could this not misalign the rest?


> +#endif
> +#endif
> +		void *s_mem;			/* slab first object */
> +		unsigned long counters;		/* SLUB */
> +		struct {			/* SLUB */
> +			unsigned inuse:16;
> +			unsigned objects:15;
> +			unsigned frozen:1;
> +		};
> +	};
> +
>  	union {




[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