* [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
@ 2015-11-12 7:54 ` yalin wang
0 siblings, 0 replies; 8+ messages in thread
From: yalin wang @ 2015-11-12 7:54 UTC (permalink / raw)
To: rostedt, mingo, yalin.wang2010, namhyung, acme, akpm, mhocko,
hannes, vdavydov, vbabka, mgorman, bywxiaobai, tj, linux-kernel,
linux-mm
Move node_id zone_idx shrink flags into trace function,
so thay we don't need caculate these args if the trace is disabled,
and will make this function have less arguments.
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
include/trace/events/vmscan.h | 14 +++++++-------
mm/vmscan.c | 7 ++-----
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index dae7836..f8d6b34 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -352,11 +352,11 @@ TRACE_EVENT(mm_vmscan_writepage,
TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
- TP_PROTO(int nid, int zid,
- unsigned long nr_scanned, unsigned long nr_reclaimed,
- int priority, int reclaim_flags),
+ TP_PROTO(struct zone *zone,
+ unsigned long nr_scanned, unsigned long nr_reclaimed,
+ int priority, int file),
- TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
+ TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
TP_STRUCT__entry(
__field(int, nid)
@@ -368,12 +368,12 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
),
TP_fast_assign(
- __entry->nid = nid;
- __entry->zid = zid;
+ __entry->nid = zone->zone_pgdat->node_id;
+ __entry->zid = zone_idx(zone);
__entry->nr_scanned = nr_scanned;
__entry->nr_reclaimed = nr_reclaimed;
__entry->priority = priority;
- __entry->reclaim_flags = reclaim_flags;
+ __entry->reclaim_flags = trace_shrink_flags(file);
),
TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s",
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 83cea53..bd2918e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1691,11 +1691,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
current_may_throttle())
wait_iff_congested(zone, BLK_RW_ASYNC, HZ/10);
- trace_mm_vmscan_lru_shrink_inactive(zone->zone_pgdat->node_id,
- zone_idx(zone),
- nr_scanned, nr_reclaimed,
- sc->priority,
- trace_shrink_flags(file));
+ trace_mm_vmscan_lru_shrink_inactive(zone, nr_scanned, nr_reclaimed,
+ sc->priority, file);
return nr_reclaimed;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
@ 2015-11-12 7:54 ` yalin wang
0 siblings, 0 replies; 8+ messages in thread
From: yalin wang @ 2015-11-12 7:54 UTC (permalink / raw)
To: rostedt, mingo, yalin.wang2010, namhyung, acme, akpm, mhocko,
hannes, vdavydov, vbabka, mgorman, bywxiaobai, tj, linux-kernel,
linux-mm
Move node_id zone_idx shrink flags into trace function,
so thay we don't need caculate these args if the trace is disabled,
and will make this function have less arguments.
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
include/trace/events/vmscan.h | 14 +++++++-------
mm/vmscan.c | 7 ++-----
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index dae7836..f8d6b34 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -352,11 +352,11 @@ TRACE_EVENT(mm_vmscan_writepage,
TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
- TP_PROTO(int nid, int zid,
- unsigned long nr_scanned, unsigned long nr_reclaimed,
- int priority, int reclaim_flags),
+ TP_PROTO(struct zone *zone,
+ unsigned long nr_scanned, unsigned long nr_reclaimed,
+ int priority, int file),
- TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
+ TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
TP_STRUCT__entry(
__field(int, nid)
@@ -368,12 +368,12 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
),
TP_fast_assign(
- __entry->nid = nid;
- __entry->zid = zid;
+ __entry->nid = zone->zone_pgdat->node_id;
+ __entry->zid = zone_idx(zone);
__entry->nr_scanned = nr_scanned;
__entry->nr_reclaimed = nr_reclaimed;
__entry->priority = priority;
- __entry->reclaim_flags = reclaim_flags;
+ __entry->reclaim_flags = trace_shrink_flags(file);
),
TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s",
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 83cea53..bd2918e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1691,11 +1691,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
current_may_throttle())
wait_iff_congested(zone, BLK_RW_ASYNC, HZ/10);
- trace_mm_vmscan_lru_shrink_inactive(zone->zone_pgdat->node_id,
- zone_idx(zone),
- nr_scanned, nr_reclaimed,
- sc->priority,
- trace_shrink_flags(file));
+ trace_mm_vmscan_lru_shrink_inactive(zone, nr_scanned, nr_reclaimed,
+ sc->priority, file);
return nr_reclaimed;
}
--
1.9.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
2015-11-12 7:54 ` yalin wang
@ 2015-11-12 14:26 ` Steven Rostedt
-1 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2015-11-12 14:26 UTC (permalink / raw)
To: yalin wang
Cc: mingo, namhyung, acme, akpm, mhocko, hannes, vdavydov, vbabka,
mgorman, bywxiaobai, tj, linux-kernel, linux-mm
On Thu, 12 Nov 2015 15:54:56 +0800
yalin wang <yalin.wang2010@gmail.com> wrote:
> Move node_id zone_idx shrink flags into trace function,
> so thay we don't need caculate these args if the trace is disabled,
> and will make this function have less arguments.
>
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
@ 2015-11-12 14:26 ` Steven Rostedt
0 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2015-11-12 14:26 UTC (permalink / raw)
To: yalin wang
Cc: mingo, namhyung, acme, akpm, mhocko, hannes, vdavydov, vbabka,
mgorman, bywxiaobai, tj, linux-kernel, linux-mm
On Thu, 12 Nov 2015 15:54:56 +0800
yalin wang <yalin.wang2010@gmail.com> wrote:
> Move node_id zone_idx shrink flags into trace function,
> so thay we don't need caculate these args if the trace is disabled,
> and will make this function have less arguments.
>
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
2015-11-12 7:54 ` yalin wang
@ 2015-11-13 13:16 ` Vlastimil Babka
-1 siblings, 0 replies; 8+ messages in thread
From: Vlastimil Babka @ 2015-11-13 13:16 UTC (permalink / raw)
To: yalin wang, rostedt, mingo, namhyung, acme, akpm, mhocko, hannes,
vdavydov, mgorman, bywxiaobai, tj, linux-kernel, linux-mm
On 11/12/2015 08:54 AM, yalin wang wrote:
> Move node_id zone_idx shrink flags into trace function,
> so thay we don't need caculate these args if the trace is disabled,
> and will make this function have less arguments.
>
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
> ---
> include/trace/events/vmscan.h | 14 +++++++-------
> mm/vmscan.c | 7 ++-----
> 2 files changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
> index dae7836..f8d6b34 100644
> --- a/include/trace/events/vmscan.h
> +++ b/include/trace/events/vmscan.h
> @@ -352,11 +352,11 @@ TRACE_EVENT(mm_vmscan_writepage,
>
> TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
>
> - TP_PROTO(int nid, int zid,
> - unsigned long nr_scanned, unsigned long nr_reclaimed,
> - int priority, int reclaim_flags),
> + TP_PROTO(struct zone *zone,
> + unsigned long nr_scanned, unsigned long nr_reclaimed,
> + int priority, int file),
>
> - TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
> + TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
>
> TP_STRUCT__entry(
> __field(int, nid)
> @@ -368,12 +368,12 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
> ),
>
> TP_fast_assign(
> - __entry->nid = nid;
> - __entry->zid = zid;
> + __entry->nid = zone->zone_pgdat->node_id;
While at it, convert it to zone_to_nid()? It's not just encapsulation,
but also one less pointer dereference.
Then you can add my Acked-by.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
@ 2015-11-13 13:16 ` Vlastimil Babka
0 siblings, 0 replies; 8+ messages in thread
From: Vlastimil Babka @ 2015-11-13 13:16 UTC (permalink / raw)
To: yalin wang, rostedt, mingo, namhyung, acme, akpm, mhocko, hannes,
vdavydov, mgorman, bywxiaobai, tj, linux-kernel, linux-mm
On 11/12/2015 08:54 AM, yalin wang wrote:
> Move node_id zone_idx shrink flags into trace function,
> so thay we don't need caculate these args if the trace is disabled,
> and will make this function have less arguments.
>
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
> ---
> include/trace/events/vmscan.h | 14 +++++++-------
> mm/vmscan.c | 7 ++-----
> 2 files changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
> index dae7836..f8d6b34 100644
> --- a/include/trace/events/vmscan.h
> +++ b/include/trace/events/vmscan.h
> @@ -352,11 +352,11 @@ TRACE_EVENT(mm_vmscan_writepage,
>
> TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
>
> - TP_PROTO(int nid, int zid,
> - unsigned long nr_scanned, unsigned long nr_reclaimed,
> - int priority, int reclaim_flags),
> + TP_PROTO(struct zone *zone,
> + unsigned long nr_scanned, unsigned long nr_reclaimed,
> + int priority, int file),
>
> - TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
> + TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
>
> TP_STRUCT__entry(
> __field(int, nid)
> @@ -368,12 +368,12 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
> ),
>
> TP_fast_assign(
> - __entry->nid = nid;
> - __entry->zid = zid;
> + __entry->nid = zone->zone_pgdat->node_id;
While at it, convert it to zone_to_nid()? It's not just encapsulation,
but also one less pointer dereference.
Then you can add my Acked-by.
Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
2015-11-13 13:16 ` Vlastimil Babka
@ 2015-11-16 2:38 ` yalin wang
-1 siblings, 0 replies; 8+ messages in thread
From: yalin wang @ 2015-11-16 2:38 UTC (permalink / raw)
To: Vlastimil Babka
Cc: Steven Rostedt, Ingo Molnar, namhyung, acme, Andrew Morton,
Michal Hocko, Johannes Weiner, vdavydov, mgorman, bywxiaobai,
Tejun Heo, linux-kernel, linux-mm
> On Nov 13, 2015, at 21:16, Vlastimil Babka <vbabka@suse.cz> wrote:
>
> zone_to_nid
make sense,
i will send V2 patch ,
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
@ 2015-11-16 2:38 ` yalin wang
0 siblings, 0 replies; 8+ messages in thread
From: yalin wang @ 2015-11-16 2:38 UTC (permalink / raw)
To: Vlastimil Babka
Cc: Steven Rostedt, Ingo Molnar, namhyung, acme, Andrew Morton,
Michal Hocko, Johannes Weiner, vdavydov, mgorman, bywxiaobai,
Tejun Heo, linux-kernel, linux-mm
> On Nov 13, 2015, at 21:16, Vlastimil Babka <vbabka@suse.cz> wrote:
>
> zone_to_nid
make sense,
i will send V2 patch ,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-11-16 2:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 7:54 [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types yalin wang
2015-11-12 7:54 ` yalin wang
2015-11-12 14:26 ` Steven Rostedt
2015-11-12 14:26 ` Steven Rostedt
2015-11-13 13:16 ` Vlastimil Babka
2015-11-13 13:16 ` Vlastimil Babka
2015-11-16 2:38 ` yalin wang
2015-11-16 2:38 ` yalin wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.