Re: [PATCH 1/4] mm: introduce 'encoded' page pointers with embedded extra bits

Alexander Gordeev
2022-11-09T06:38:15Z

On Tue, Nov 08, 2022 at 11:41:36AM -0800, Linus Torvalds wrote:

Hi Linus,

[...]

> +struct encoded_page;
> +#define ENCODE_PAGE_BITS 3ul
> +static inline struct encoded_page *encode_page(struct page *page, unsigned long flags)
> +{

Any reaction in case ((flags & ~ENCODE_PAGE_BITS) != 0)?

> + return (struct encoded_page *)(flags | (unsigned long)page);
> +}

Thanks!