From: Matthew Wilcox <willy@infradead.org>
To: Dave Hansen <dave.hansen@intel.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
linux-mm@kvack.org, Matthew Wilcox <mawilcox@microsoft.com>
Subject: Re: [PATCH v2] mm: Split page_type out from _map_count
Date: Fri, 9 Feb 2018 11:28:16 -0800 [thread overview]
Message-ID: <20180209192816.GG16666@bombadil.infradead.org> (raw)
In-Reply-To: <7c5414ce-fece-b908-bebc-22fa15fc783c@intel.com>
On Fri, Feb 09, 2018 at 10:43:19AM -0800, Dave Hansen wrote:
> 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 */
>
> 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".
I agree, it'd be nice. I think the only invariant we can claim to be
true is that if PageSlab is set then page_type is not valid. There are
probably any number of bits in the page->flags that aren't currently in
use by any of the consumers who actually set page_type, but I don't feel
like there's a straightforward rule that we can enforce. Maybe they'll
want to start using them in the future for their own purposes.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-02-09 19:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 21:30 [PATCH] mm: Split page_type out from _map_count Matthew Wilcox
2018-02-09 10:51 ` Kirill A. Shutemov
2018-02-09 13:49 ` Matthew Wilcox
2018-02-09 15:28 ` [PATCH v2] " Matthew Wilcox
2018-02-09 18:43 ` Dave Hansen
2018-02-09 19:04 ` Christopher Lameter
2018-02-09 19:28 ` Matthew Wilcox [this message]
2018-02-10 5:00 ` [PATCH] " kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180209192816.GG16666@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=dave.hansen@intel.com \
--cc=kirill@shutemov.name \
--cc=linux-mm@kvack.org \
--cc=mawilcox@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).