[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5645E2A4.3010509@suse.cz>
Date: Fri, 13 Nov 2015 14:16:20 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: yalin wang <yalin.wang2010@...il.com>, rostedt@...dmis.org,
mingo@...hat.com, namhyung@...nel.org, acme@...hat.com,
akpm@...ux-foundation.org, mhocko@...e.cz, hannes@...xchg.org,
vdavydov@...allels.com, mgorman@...hsingularity.net,
bywxiaobai@....com, tj@...nel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
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@...il.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists