Re: Distinguishing VMalloc pages

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

 



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.




[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