Re: [PATCH v2 02/57] mm: Add the first tail page to struct folio

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

 



On Fri,  2 Sep 2022 20:45:58 +0100 "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx> wrote:

> Some of the static checkers get confused by extracting the page from
> the folio and referring to fields in the first tail page.  Adding these
> fields to struct folio lets us avoid doing that.  It has the risk that
> people will refer to those fields without checking that the folio is
> actually a large folio, so prefix them with underscores and document
> the preferred function to use instead.
> 

Huh.  Silly checkers.

Which one(s)?

> @@ -282,9 +289,17 @@ struct folio {
>  		};
>  		struct page page;
>  	};
> +	unsigned long _flags_1;
> +	unsigned long __head;
> +	unsigned char _folio_dtor;
> +	unsigned char _folio_order;
> +	atomic_t _total_mapcount;
> +	atomic_t _pincount;
> +#ifdef CONFIG_64BIT
> +	unsigned int _folio_nr_pages;
> +#endif
>  };

Do we really want to muck things up like this?  Can it at least be
declared temporary until the checker(s?) are fixed?




[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