Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207244
b: refs/heads/master
c: 755f022
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Aug 10, 2010
1 parent b825bd1 commit 4de5216
Show file tree
Hide file tree
Showing 3 changed files with 44 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: a8a94d151521b248727c1f88756174e15260815a
refs/heads/master: 755f0225e8347b23a33ee6e3fb14a35310f95766
41 changes: 41 additions & 0 deletions trunk/include/trace/events/vmscan.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@
#include <linux/tracepoint.h>
#include "gfpflags.h"

#define RECLAIM_WB_ANON 0x0001u
#define RECLAIM_WB_FILE 0x0002u
#define RECLAIM_WB_SYNC 0x0004u
#define RECLAIM_WB_ASYNC 0x0008u

#define show_reclaim_flags(flags) \
(flags) ? __print_flags(flags, "|", \
{RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \
{RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \
{RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \
{RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \
) : "RECLAIM_WB_NONE"

#define trace_reclaim_flags(page, sync) ( \
(page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \
(sync == PAGEOUT_IO_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \
)

TRACE_EVENT(mm_vmscan_kswapd_sleep,

TP_PROTO(int nid),
Expand Down Expand Up @@ -155,6 +173,29 @@ TRACE_EVENT(mm_vmscan_lru_isolate,
__entry->nr_lumpy_failed)
);

TRACE_EVENT(mm_vmscan_writepage,

TP_PROTO(struct page *page,
int reclaim_flags),

TP_ARGS(page, reclaim_flags),

TP_STRUCT__entry(
__field(struct page *, page)
__field(int, reclaim_flags)
),

TP_fast_assign(
__entry->page = page;
__entry->reclaim_flags = reclaim_flags;
),

TP_printk("page=%p pfn=%lu flags=%s",
__entry->page,
page_to_pfn(__entry->page),
show_reclaim_flags(__entry->reclaim_flags))
);

#endif /* _TRACE_VMSCAN_H */

/* This part must be outside protection */
Expand Down
2 changes: 2 additions & 0 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ static pageout_t pageout(struct page *page, struct address_space *mapping,
/* synchronous write or broken a_ops? */
ClearPageReclaim(page);
}
trace_mm_vmscan_writepage(page,
trace_reclaim_flags(page, sync_writeback));
inc_zone_page_state(page, NR_VMSCAN_WRITE);
return PAGE_SUCCESS;
}
Expand Down

0 comments on commit 4de5216

Please sign in to comment.