Merge "mm, page_owner: print migratetype of page and pageblock, symbolic flags"
This commit is contained in:
commit
b7d16a2978
4 changed files with 24 additions and 30 deletions
|
@ -71,6 +71,9 @@ enum {
|
||||||
*/
|
*/
|
||||||
extern int *get_migratetype_fallbacks(int mtype);
|
extern int *get_migratetype_fallbacks(int mtype);
|
||||||
|
|
||||||
|
/* In mm/page_alloc.c; keep in sync also with show_migration_types() there */
|
||||||
|
extern char * const migratetype_names[MIGRATE_TYPES];
|
||||||
|
|
||||||
#ifdef CONFIG_CMA
|
#ifdef CONFIG_CMA
|
||||||
bool is_cma_pageblock(struct page *page);
|
bool is_cma_pageblock(struct page *page);
|
||||||
# define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
|
# define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
|
||||||
|
|
|
@ -223,6 +223,20 @@ static char * const zone_names[MAX_NR_ZONES] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void free_compound_page(struct page *page);
|
static void free_compound_page(struct page *page);
|
||||||
|
|
||||||
|
char * const migratetype_names[MIGRATE_TYPES] = {
|
||||||
|
"Unmovable",
|
||||||
|
"Movable",
|
||||||
|
"Reclaimable",
|
||||||
|
#ifdef CONFIG_CMA
|
||||||
|
"CMA",
|
||||||
|
#endif
|
||||||
|
"HighAtomic",
|
||||||
|
#ifdef CONFIG_MEMORY_ISOLATION
|
||||||
|
"Isolate",
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
compound_page_dtor * const compound_page_dtors[] = {
|
compound_page_dtor * const compound_page_dtors[] = {
|
||||||
NULL,
|
NULL,
|
||||||
free_compound_page,
|
free_compound_page,
|
||||||
|
|
|
@ -104,8 +104,9 @@ print_page_owner(char __user *buf, size_t count, unsigned long pfn,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = snprintf(kbuf, count,
|
ret = snprintf(kbuf, count,
|
||||||
"Page allocated via order %u, mask 0x%x\n",
|
"Page allocated via order %u, mask %#x(%pGg)\n",
|
||||||
page_ext->order, page_ext->gfp_mask);
|
page_ext->order, page_ext->gfp_mask,
|
||||||
|
&page_ext->gfp_mask);
|
||||||
|
|
||||||
if (ret >= count)
|
if (ret >= count)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -114,23 +115,12 @@ print_page_owner(char __user *buf, size_t count, unsigned long pfn,
|
||||||
pageblock_mt = get_pfnblock_migratetype(page, pfn);
|
pageblock_mt = get_pfnblock_migratetype(page, pfn);
|
||||||
page_mt = gfpflags_to_migratetype(page_ext->gfp_mask);
|
page_mt = gfpflags_to_migratetype(page_ext->gfp_mask);
|
||||||
ret += snprintf(kbuf + ret, count - ret,
|
ret += snprintf(kbuf + ret, count - ret,
|
||||||
"PFN %lu Block %lu type %d %s Flags %s%s%s%s%s%s%s%s%s%s%s%s\n",
|
"PFN %lu type %s Block %lu type %s Flags %#lx(%pGp)\n",
|
||||||
pfn,
|
pfn,
|
||||||
|
migratetype_names[page_mt],
|
||||||
pfn >> pageblock_order,
|
pfn >> pageblock_order,
|
||||||
pageblock_mt,
|
migratetype_names[pageblock_mt],
|
||||||
pageblock_mt != page_mt ? "Fallback" : " ",
|
page->flags, &page->flags);
|
||||||
PageLocked(page) ? "K" : " ",
|
|
||||||
PageError(page) ? "E" : " ",
|
|
||||||
PageReferenced(page) ? "R" : " ",
|
|
||||||
PageUptodate(page) ? "U" : " ",
|
|
||||||
PageDirty(page) ? "D" : " ",
|
|
||||||
PageLRU(page) ? "L" : " ",
|
|
||||||
PageActive(page) ? "A" : " ",
|
|
||||||
PageSlab(page) ? "S" : " ",
|
|
||||||
PageWriteback(page) ? "W" : " ",
|
|
||||||
PageCompound(page) ? "C" : " ",
|
|
||||||
PageSwapCache(page) ? "B" : " ",
|
|
||||||
PageMappedToDisk(page) ? "M" : " ");
|
|
||||||
|
|
||||||
if (ret >= count)
|
if (ret >= count)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
13
mm/vmstat.c
13
mm/vmstat.c
|
@ -927,19 +927,6 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
static char * const migratetype_names[MIGRATE_TYPES] = {
|
|
||||||
"Unmovable",
|
|
||||||
"Movable",
|
|
||||||
"Reclaimable",
|
|
||||||
#ifdef CONFIG_CMA
|
|
||||||
"CMA",
|
|
||||||
#endif
|
|
||||||
"HighAtomic",
|
|
||||||
#ifdef CONFIG_MEMORY_ISOLATION
|
|
||||||
"Isolate",
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
static void frag_show_print(struct seq_file *m, pg_data_t *pgdat,
|
static void frag_show_print(struct seq_file *m, pg_data_t *pgdat,
|
||||||
struct zone *zone)
|
struct zone *zone)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue