mm, page_alloc: inline pageblock lookup in page free fast paths
Subsystems (4)
[email protected]
maintainerPATCH 111/117 mm, page_alloc: inline pageblock lookup in page free fast paths
From: Mel Gorman <[email protected]>
Subject: mm, page_alloc: inline pageblock lookup in page free fast paths
The function call overhead of get_pfnblock_flags_mask() is measurable in the page free paths. This patch uses an inlined version that is faster.
Signed-off-by Mel Gorman <[email protected]>
Acked-by Vlastimil Babka <[email protected]>
Cc Jesper Dangaard Brouer <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
include/linux/mmzone.h | 7 - mm/page_alloc.c | 188 ++++++++++++++++++++------------------- mm/page_owner.c | 2 mm/vmstat.c | 2 4 files changed, 102 insertions(+), 97 deletions(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-page_alloc-inline-pageblock-lookup-in-page-free-fast-paths +0 -7
@@ -85,13 +85,6 @@ extern int page_group_by_mobility_disablget_pfnblock_flags_mask (page,page_to_pfn (page), \ PB_migrate_end, MIGRATETYPE_MASK) -static inline int get_pfnblock_migratetype (struct page *page,unsigned long pfn) -{ -BUILD_BUG_ON (PB_migrate_end - PB_migrate !=2 ); -return get_pfnblock_flags_mask (page, pfn, PB_migrate_end, -MIGRATETYPE_MASK ); -} -struct free_area {struct list_head free_list[MIGRATE_TYPES ];unsigned long nr_free;
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-inline-pageblock-lookup-in-page-free-fast-paths +100 -88
200 lines not on this page · raw message
mm/page_owner.c renamed from mm/page_owner.c~mm-page_alloc-inline-pageblock-lookup-in-page-free-fast-paths +1 -1
@@ -143,7 +143,7 @@ print_page_owner(char __user *buf, size_ goto err;/* Print information relevant to grouping pages by mobility */ - pageblock_mt =get_pfnblock_migratetype (page, pfn); + pageblock_mt =get_pageblock_migratetype (page); page_mt =gfpflags_to_migratetype (page_ext->gfp_mask); ret += snprintf(kbuf + ret, count - ret, "PFN %lu type %s Block %lu type %s Flags %#lx(%pGp)\n",
mm/vmstat.c renamed from mm/vmstat.c~mm-page_alloc-inline-pageblock-lookup-in-page-free-fast-paths +1 -1
@@ -1041,7 +1041,7 @@ static void pagetypeinfo_showmixedcount_ block_end_pfn =min (block_end_pfn, end_pfn); page =pfn_to_page (pfn); - pageblock_mt =get_pfnblock_migratetype (page, pfn); + pageblock_mt =get_pageblock_migratetype (page);for (; pfn < block_end_pfn; pfn++) {if (!pfn_valid_within (pfn))
_