From: Matthew Wilcox <willy@infradead.org>
To: Christopher Lameter <cl@linux.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>,
Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org
Subject: Re: Distinguishing VMalloc pages
Date: Mon, 11 Jun 2018 10:59:27 -0700 [thread overview]
Message-ID: <20180611175927.GC28292@bombadil.infradead.org> (raw)
In-Reply-To: <01000163efe179fe-d6270c58-eaba-482f-a6bd-334667250ef7-000000@email.amazonses.com>
On Mon, Jun 11, 2018 at 05:25:21PM +0000, Christopher Lameter wrote:
> On Mon, 11 Jun 2018, Matthew Wilcox wrote:
>
> >
> > I think we all like the idea of being able to look at a page [1] and
> > determine what it's used for. We have two places that we already look:
> >
> > PageSlab
> > page_type
>
> Since we already have PageSlab: Is it possible to use that flag
> differently so that it is maybe something like PageTyped(xx)? I think
> there may be some bits available somewhere if PageSlab( is set and these
> typed pages usually are not on the lru. So if its untyped the page is on
> LRU otherwise the type can be identified somehow?
Yes, I've been thinking about that option too; thanks for bringing it up!
We need to go through the PageFlags and see which combinations of them
are valid. I started on that in that same spreasdsheet (purposes tab) ...
Type flags: SL RS HP
State: LO ER RF UP DI LR AC WA O1 A1 PR P2 WB
HD MD RC SB UV ML UC YG ID
Mapping - 0xxx
Slab - 1000
VMalloc - 1001
Reserved - 1010
HWPoison - 1011
Kernel - 1100
PageTable - 1101
PageBuddy - 1110
1111 unused for now
SL is the Slab bit. RS is Reserved and HP is HWPoison. I believe that
all three of those bits are mutually exclusive (but maybe I'm wrong).
At any rate, SwapBacked only makes sense on anonymous pages (right?) and
MappedToDisk certainly doesn't make sense on slab pages, so we can use
those two bits ... I think.
next prev parent reply other threads:[~2018-06-11 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-11 12:11 Matthew Wilcox
2018-06-11 17:25 ` Christopher Lameter
2018-06-11 17:59 ` Matthew Wilcox [this message]
2018-06-12 9:54 ` Igor Stoppa
2018-06-12 11:36 ` Matthew Wilcox
2018-06-12 12:35 ` Igor Stoppa
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=20180611175927.GC28292@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=aryabinin@virtuozzo.com \
--cc=cl@linux.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
/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