Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164434
b: refs/heads/master
c: e0fff1b
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Sep 22, 2009
1 parent afc8b11 commit b853152
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b4f278c030aa4b6ee0915f396e9a9478d92d610
refs/heads/master: e0fff1bd12469c45dab088e353d8882761387bb6
38 changes: 38 additions & 0 deletions trunk/include/trace/events/kmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,44 @@ TRACE_EVENT(mm_page_alloc,
show_gfp_flags(__entry->gfp_flags))
);

TRACE_EVENT(mm_page_alloc_extfrag,

TP_PROTO(struct page *page,
int alloc_order, int fallback_order,
int alloc_migratetype, int fallback_migratetype),

TP_ARGS(page,
alloc_order, fallback_order,
alloc_migratetype, fallback_migratetype),

TP_STRUCT__entry(
__field( struct page *, page )
__field( int, alloc_order )
__field( int, fallback_order )
__field( int, alloc_migratetype )
__field( int, fallback_migratetype )
),

TP_fast_assign(
__entry->page = page;
__entry->alloc_order = alloc_order;
__entry->fallback_order = fallback_order;
__entry->alloc_migratetype = alloc_migratetype;
__entry->fallback_migratetype = fallback_migratetype;
),

TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d",
__entry->page,
page_to_pfn(__entry->page),
__entry->alloc_order,
__entry->fallback_order,
pageblock_order,
__entry->alloc_migratetype,
__entry->fallback_migratetype,
__entry->fallback_order < pageblock_order,
__entry->alloc_migratetype == __entry->fallback_migratetype)
);

#endif /* _TRACE_KMEM_H */

/* This part must be outside protection */
Expand Down
4 changes: 4 additions & 0 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,10 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
start_migratetype);

expand(zone, page, order, current_order, area, migratetype);

trace_mm_page_alloc_extfrag(page, order, current_order,
start_migratetype, migratetype);

return page;
}
}
Expand Down

0 comments on commit b853152

Please sign in to comment.