Re: [PATCH v2] mm: Split page_type out from _map_count

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

 



On 02/09/2018 07:28 AM, Matthew Wilcox wrote:
>  	union {
> +		/*
> +		 * If the page is neither PageSlab nor PageAnon, the value
> +		 * stored here may help distinguish it from page cache pages.
> +		 * See page-flags.h for a list of page types which are
> +		 * currently stored here.
> +		 */
> +		unsigned int page_type;
> +
>  		_slub_counter_t counters;
>  		unsigned int active;		/* SLAB */
>  		struct {			/* SLUB */
> @@ -107,11 +115,6 @@ struct page {
>  			/*
>  			 * Count of ptes mapped in mms, to show when
>  			 * page is mapped & limit reverse map searches.
> -			 *
> -			 * Extra information about page type may be
> -			 * stored here for pages that are never mapped,
> -			 * in which case the value MUST BE <= -2.
> -			 * See page-flags.h for more details.
>  			 */
>  			atomic_t _mapcount;

Are there any straightforward rules that we can enforce here?  For
instance, if you are using "page_type", you can never have PG_lru set.

Not that we have done this at all for 'struct page' historically, it
would be really convenient to have a clear definition for when
"page_type" is valid vs. "_mapcount".

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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