From: Vlastimil Babka <vbabka@suse.cz>
To: yalin wang <yalin.wang2010@gmail.com>,
rostedt@goodmis.org, mingo@redhat.com, namhyung@kernel.org,
acme@redhat.com, akpm@linux-foundation.org, mhocko@suse.cz,
hannes@cmpxchg.org, vdavydov@parallels.com,
mgorman@techsingularity.net, bywxiaobai@163.com, tj@kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: change mm_vmscan_lru_shrink_inactive() proto types
Date: Fri, 13 Nov 2015 14:16:20 +0100 [thread overview]
Message-ID: <5645E2A4.3010509@suse.cz> (raw)
In-Reply-To: <1447314896-24849-1-git-send-email-yalin.wang2010@gmail.com>
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>
next prev parent reply other threads:[~2015-11-13 13:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 7:54 yalin wang
2015-11-12 14:26 ` Steven Rostedt
2015-11-13 13:16 ` Vlastimil Babka [this message]
2015-11-16 2:38 ` yalin wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5645E2A4.3010509@suse.cz \
--to=vbabka@suse.cz \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bywxiaobai@163.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.cz \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=vdavydov@parallels.com \
--cc=yalin.wang2010@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox