mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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 <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e5b31ac2ca
commit
0b423ca22f
4 changed files with 102 additions and 97 deletions
|
@ -85,13 +85,6 @@ extern int page_group_by_mobility_disabled;
|
|||
get_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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue