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

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

 



On Fri, 9 Feb 2018, Dave Hansen wrote:

> 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".

Well in general we would like to be able to enforce uses depending on
the contents of other fields in struct page. That would require compiler
support I guess?

What we could do is write a struct page validator that checks contents
using some macros? Could be added to the usual places where we check
consistency and could also be used for a global sweep over struct pages
for validation.

SLUB can do that for metadata. If we could express consistency rules for
objects in general then it may even have a wider applicability.

--
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