Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1267682 > unrolled thread

[PATCH] mm: change trace_mm_vmscan_writepage() proto type

Started byyalin wang <yalin.wang2010@gmail.com>
First post2015-11-12 08:50 +0100
Last post2015-11-12 15:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mm: change trace_mm_vmscan_writepage() proto type yalin wang <yalin.wang2010@gmail.com> - 2015-11-12 08:50 +0100
    Re: [PATCH] mm: change trace_mm_vmscan_writepage() proto type Steven Rostedt <rostedt@goodmis.org> - 2015-11-12 15:30 +0100

#1267682 — [PATCH] mm: change trace_mm_vmscan_writepage() proto type

Fromyalin wang <yalin.wang2010@gmail.com>
Date2015-11-12 08:50 +0100
Subject[PATCH] mm: change trace_mm_vmscan_writepage() proto type
Message-ID<qtUNP-5ZA-1@gated-at.bofh.it>
Move trace_reclaim_flags() into trace function,
so that we don't need caculate these flags if the trace is disabled.

Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
 include/trace/events/vmscan.h | 7 +++----
 mm/vmscan.c                   | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index f66476b..dae7836 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -330,10 +330,9 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
 
 TRACE_EVENT(mm_vmscan_writepage,
 
-	TP_PROTO(struct page *page,
-		int reclaim_flags),
+	TP_PROTO(struct page *page),
 
-	TP_ARGS(page, reclaim_flags),
+	TP_ARGS(page),
 
 	TP_STRUCT__entry(
 		__field(unsigned long, pfn)
@@ -342,7 +341,7 @@ TRACE_EVENT(mm_vmscan_writepage,
 
 	TP_fast_assign(
 		__entry->pfn = page_to_pfn(page);
-		__entry->reclaim_flags = reclaim_flags;
+		__entry->reclaim_flags = trace_reclaim_flags(page);
 	),
 
 	TP_printk("page=%p pfn=%lu flags=%s",
diff --git a/mm/vmscan.c b/mm/vmscan.c
index a4507ec..83cea53 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -594,7 +594,7 @@ 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));
+		trace_mm_vmscan_writepage(page);
 		inc_zone_page_state(page, NR_VMSCAN_WRITE);
 		return PAGE_SUCCESS;
 	}
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1267971

FromSteven Rostedt <rostedt@goodmis.org>
Date2015-11-12 15:30 +0100
Message-ID<qu12W-1Bf-5@gated-at.bofh.it>
In reply to#1267682
On Thu, 12 Nov 2015 15:42:33 +0800
yalin wang <yalin.wang2010@gmail.com> wrote:

> Move trace_reclaim_flags() into trace function,
> so that we don't need caculate these flags if the trace is disabled.
> 
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>

Reviewed-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web