diff options
-rw-r--r-- | Documentation/trace/events-kmem.txt | 12 | ||||
-rw-r--r-- | Documentation/trace/postprocess/trace-pagealloc-postprocess.pl | 20 | ||||
-rw-r--r-- | include/trace/events/kmem.h | 4 | ||||
-rw-r--r-- | mm/page_alloc.c | 4 |
4 files changed, 20 insertions, 20 deletions
diff --git a/Documentation/trace/events-kmem.txt b/Documentation/trace/events-kmem.txt index aa82ee4a5a87..194800410061 100644 --- a/Documentation/trace/events-kmem.txt +++ b/Documentation/trace/events-kmem.txt | |||
@@ -40,8 +40,8 @@ but the call_site can usually be used to extrapolate that information. | |||
40 | ================== | 40 | ================== |
41 | mm_page_alloc page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s | 41 | mm_page_alloc page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s |
42 | mm_page_alloc_zone_locked page=%p pfn=%lu order=%u migratetype=%d cpu=%d percpu_refill=%d | 42 | mm_page_alloc_zone_locked page=%p pfn=%lu order=%u migratetype=%d cpu=%d percpu_refill=%d |
43 | mm_page_free_direct page=%p pfn=%lu order=%d | 43 | mm_page_free page=%p pfn=%lu order=%d |
44 | mm_pagevec_free page=%p pfn=%lu order=%d cold=%d | 44 | mm_page_free_batched page=%p pfn=%lu order=%d cold=%d |
45 | 45 | ||
46 | These four events deal with page allocation and freeing. mm_page_alloc is | 46 | These four events deal with page allocation and freeing. mm_page_alloc is |
47 | a simple indicator of page allocator activity. Pages may be allocated from | 47 | a simple indicator of page allocator activity. Pages may be allocated from |
@@ -53,13 +53,13 @@ amounts of activity imply high activity on the zone->lock. Taking this lock | |||
53 | impairs performance by disabling interrupts, dirtying cache lines between | 53 | impairs performance by disabling interrupts, dirtying cache lines between |
54 | CPUs and serialising many CPUs. | 54 | CPUs and serialising many CPUs. |
55 | 55 | ||
56 | When a page is freed directly by the caller, the mm_page_free_direct event | 56 | When a page is freed directly by the caller, the only mm_page_free event |
57 | is triggered. Significant amounts of activity here could indicate that the | 57 | is triggered. Significant amounts of activity here could indicate that the |
58 | callers should be batching their activities. | 58 | callers should be batching their activities. |
59 | 59 | ||
60 | When pages are freed using a pagevec, the mm_pagevec_free is | 60 | When pages are freed in batch, the also mm_page_free_batched is triggered. |
61 | triggered. Broadly speaking, pages are taken off the LRU lock in bulk and | 61 | Broadly speaking, pages are taken off the LRU lock in bulk and |
62 | freed in batch with a pagevec. Significant amounts of activity here could | 62 | freed in batch with a page list. Significant amounts of activity here could |
63 | indicate that the system is under memory pressure and can also indicate | 63 | indicate that the system is under memory pressure and can also indicate |
64 | contention on the zone->lru_lock. | 64 | contention on the zone->lru_lock. |
65 | 65 | ||
diff --git a/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl b/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl index 7df50e8cf4d9..0a120aae33ce 100644 --- a/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl +++ b/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl | |||
@@ -17,8 +17,8 @@ use Getopt::Long; | |||
17 | 17 | ||
18 | # Tracepoint events | 18 | # Tracepoint events |
19 | use constant MM_PAGE_ALLOC => 1; | 19 | use constant MM_PAGE_ALLOC => 1; |
20 | use constant MM_PAGE_FREE_DIRECT => 2; | 20 | use constant MM_PAGE_FREE => 2; |
21 | use constant MM_PAGEVEC_FREE => 3; | 21 | use constant MM_PAGE_FREE_BATCHED => 3; |
22 | use constant MM_PAGE_PCPU_DRAIN => 4; | 22 | use constant MM_PAGE_PCPU_DRAIN => 4; |
23 | use constant MM_PAGE_ALLOC_ZONE_LOCKED => 5; | 23 | use constant MM_PAGE_ALLOC_ZONE_LOCKED => 5; |
24 | use constant MM_PAGE_ALLOC_EXTFRAG => 6; | 24 | use constant MM_PAGE_ALLOC_EXTFRAG => 6; |
@@ -223,10 +223,10 @@ EVENT_PROCESS: | |||
223 | # Perl Switch() sucks majorly | 223 | # Perl Switch() sucks majorly |
224 | if ($tracepoint eq "mm_page_alloc") { | 224 | if ($tracepoint eq "mm_page_alloc") { |
225 | $perprocesspid{$process_pid}->{MM_PAGE_ALLOC}++; | 225 | $perprocesspid{$process_pid}->{MM_PAGE_ALLOC}++; |
226 | } elsif ($tracepoint eq "mm_page_free_direct") { | 226 | } elsif ($tracepoint eq "mm_page_free") { |
227 | $perprocesspid{$process_pid}->{MM_PAGE_FREE_DIRECT}++; | 227 | $perprocesspid{$process_pid}->{MM_PAGE_FREE}++ |
228 | } elsif ($tracepoint eq "mm_pagevec_free") { | 228 | } elsif ($tracepoint eq "mm_page_free_batched") { |
229 | $perprocesspid{$process_pid}->{MM_PAGEVEC_FREE}++; | 229 | $perprocesspid{$process_pid}->{MM_PAGE_FREE_BATCHED}++; |
230 | } elsif ($tracepoint eq "mm_page_pcpu_drain") { | 230 | } elsif ($tracepoint eq "mm_page_pcpu_drain") { |
231 | $perprocesspid{$process_pid}->{MM_PAGE_PCPU_DRAIN}++; | 231 | $perprocesspid{$process_pid}->{MM_PAGE_PCPU_DRAIN}++; |
232 | $perprocesspid{$process_pid}->{STATE_PCPU_PAGES_DRAINED}++; | 232 | $perprocesspid{$process_pid}->{STATE_PCPU_PAGES_DRAINED}++; |
@@ -336,8 +336,8 @@ sub dump_stats { | |||
336 | $process_pid, | 336 | $process_pid, |
337 | $stats{$process_pid}->{MM_PAGE_ALLOC}, | 337 | $stats{$process_pid}->{MM_PAGE_ALLOC}, |
338 | $stats{$process_pid}->{MM_PAGE_ALLOC_ZONE_LOCKED}, | 338 | $stats{$process_pid}->{MM_PAGE_ALLOC_ZONE_LOCKED}, |
339 | $stats{$process_pid}->{MM_PAGE_FREE_DIRECT}, | 339 | $stats{$process_pid}->{MM_PAGE_FREE}, |
340 | $stats{$process_pid}->{MM_PAGEVEC_FREE}, | 340 | $stats{$process_pid}->{MM_PAGE_FREE_BATCHED}, |
341 | $stats{$process_pid}->{MM_PAGE_PCPU_DRAIN}, | 341 | $stats{$process_pid}->{MM_PAGE_PCPU_DRAIN}, |
342 | $stats{$process_pid}->{HIGH_PCPU_DRAINS}, | 342 | $stats{$process_pid}->{HIGH_PCPU_DRAINS}, |
343 | $stats{$process_pid}->{HIGH_PCPU_REFILLS}, | 343 | $stats{$process_pid}->{HIGH_PCPU_REFILLS}, |
@@ -364,8 +364,8 @@ sub aggregate_perprocesspid() { | |||
364 | 364 | ||
365 | $perprocess{$process}->{MM_PAGE_ALLOC} += $perprocesspid{$process_pid}->{MM_PAGE_ALLOC}; | 365 | $perprocess{$process}->{MM_PAGE_ALLOC} += $perprocesspid{$process_pid}->{MM_PAGE_ALLOC}; |
366 | $perprocess{$process}->{MM_PAGE_ALLOC_ZONE_LOCKED} += $perprocesspid{$process_pid}->{MM_PAGE_ALLOC_ZONE_LOCKED}; | 366 | $perprocess{$process}->{MM_PAGE_ALLOC_ZONE_LOCKED} += $perprocesspid{$process_pid}->{MM_PAGE_ALLOC_ZONE_LOCKED}; |
367 | $perprocess{$process}->{MM_PAGE_FREE_DIRECT} += $perprocesspid{$process_pid}->{MM_PAGE_FREE_DIRECT}; | 367 | $perprocess{$process}->{MM_PAGE_FREE} += $perprocesspid{$process_pid}->{MM_PAGE_FREE}; |
368 | $perprocess{$process}->{MM_PAGEVEC_FREE} += $perprocesspid{$process_pid}->{MM_PAGEVEC_FREE}; | 368 | $perprocess{$process}->{MM_PAGE_FREE_BATCHED} += $perprocesspid{$process_pid}->{MM_PAGE_FREE_BATCHED}; |
369 | $perprocess{$process}->{MM_PAGE_PCPU_DRAIN} += $perprocesspid{$process_pid}->{MM_PAGE_PCPU_DRAIN}; | 369 | $perprocess{$process}->{MM_PAGE_PCPU_DRAIN} += $perprocesspid{$process_pid}->{MM_PAGE_PCPU_DRAIN}; |
370 | $perprocess{$process}->{HIGH_PCPU_DRAINS} += $perprocesspid{$process_pid}->{HIGH_PCPU_DRAINS}; | 370 | $perprocess{$process}->{HIGH_PCPU_DRAINS} += $perprocesspid{$process_pid}->{HIGH_PCPU_DRAINS}; |
371 | $perprocess{$process}->{HIGH_PCPU_REFILLS} += $perprocesspid{$process_pid}->{HIGH_PCPU_REFILLS}; | 371 | $perprocess{$process}->{HIGH_PCPU_REFILLS} += $perprocesspid{$process_pid}->{HIGH_PCPU_REFILLS}; |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index a9c87ad8331c..5f889f16b0c8 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
@@ -147,7 +147,7 @@ DEFINE_EVENT(kmem_free, kmem_cache_free, | |||
147 | TP_ARGS(call_site, ptr) | 147 | TP_ARGS(call_site, ptr) |
148 | ); | 148 | ); |
149 | 149 | ||
150 | TRACE_EVENT(mm_page_free_direct, | 150 | TRACE_EVENT(mm_page_free, |
151 | 151 | ||
152 | TP_PROTO(struct page *page, unsigned int order), | 152 | TP_PROTO(struct page *page, unsigned int order), |
153 | 153 | ||
@@ -169,7 +169,7 @@ TRACE_EVENT(mm_page_free_direct, | |||
169 | __entry->order) | 169 | __entry->order) |
170 | ); | 170 | ); |
171 | 171 | ||
172 | TRACE_EVENT(mm_pagevec_free, | 172 | TRACE_EVENT(mm_page_free_batched, |
173 | 173 | ||
174 | TP_PROTO(struct page *page, int cold), | 174 | TP_PROTO(struct page *page, int cold), |
175 | 175 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6c77efbca5bc..516ab623d773 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -632,7 +632,7 @@ static bool free_pages_prepare(struct page *page, unsigned int order) | |||
632 | int i; | 632 | int i; |
633 | int bad = 0; | 633 | int bad = 0; |
634 | 634 | ||
635 | trace_mm_page_free_direct(page, order); | 635 | trace_mm_page_free(page, order); |
636 | kmemcheck_free_shadow(page, order); | 636 | kmemcheck_free_shadow(page, order); |
637 | 637 | ||
638 | if (PageAnon(page)) | 638 | if (PageAnon(page)) |
@@ -1196,7 +1196,7 @@ void free_hot_cold_page_list(struct list_head *list, int cold) | |||
1196 | struct page *page, *next; | 1196 | struct page *page, *next; |
1197 | 1197 | ||
1198 | list_for_each_entry_safe(page, next, list, lru) { | 1198 | list_for_each_entry_safe(page, next, list, lru) { |
1199 | trace_mm_pagevec_free(page, cold); | 1199 | trace_mm_page_free_batched(page, cold); |
1200 | free_hot_cold_page(page, cold); | 1200 | free_hot_cold_page(page, cold); |
1201 | } | 1201 | } |
1202 | } | 1202 | } |