All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: vmscan: drop zone id from kswapd tracepoints
@ 2019-03-13  4:36 Yafang Shao
  2019-03-13  8:03 ` Michal Hocko
  0 siblings, 1 reply; 3+ messages in thread
From: Yafang Shao @ 2019-03-13  4:36 UTC (permalink / raw)
  To: mhocko; +Cc: akpm, linux-mm, shaoyafang, Yafang Shao

The zid is meaningless to the user.
If we really want to expose it, we'd better expose the zone type
(i.e. ZONE_NORMAL) intead of this number.
Per discussion with Michal, seems this zid is not so userful in kswapd
tracepoints, so we'd better drop it to avoid making noise.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
 include/trace/events/vmscan.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index a1cb913..d3f029f 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -73,7 +73,9 @@
 		__entry->order	= order;
 	),
 
-	TP_printk("nid=%d zid=%d order=%d", __entry->nid, __entry->zid, __entry->order)
+	TP_printk("nid=%d order=%d",
+		__entry->nid,
+		__entry->order)
 );
 
 TRACE_EVENT(mm_vmscan_wakeup_kswapd,
@@ -96,9 +98,8 @@
 		__entry->gfp_flags	= gfp_flags;
 	),
 
-	TP_printk("nid=%d zid=%d order=%d gfp_flags=%s",
+	TP_printk("nid=%d order=%d gfp_flags=%s",
 		__entry->nid,
-		__entry->zid,
 		__entry->order,
 		show_gfp_flags(__entry->gfp_flags))
 );
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: vmscan: drop zone id from kswapd tracepoints
  2019-03-13  4:36 [PATCH] mm: vmscan: drop zone id from kswapd tracepoints Yafang Shao
@ 2019-03-13  8:03 ` Michal Hocko
  2019-03-13  8:38   ` Yafang Shao
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2019-03-13  8:03 UTC (permalink / raw)
  To: Yafang Shao; +Cc: akpm, linux-mm, shaoyafang

On Wed 13-03-19 12:36:53, Yafang Shao wrote:
> The zid is meaningless to the user.

This is quite bold statement. We do not know whether that is useful.
Quite likely not. I would go with

"It is not clear how is the zone id useful in kswapd tracepoints and the
id itself is not really easy to process because it depends on the
configuration (available zones). Let's drop the id for now. If somebody
really needs that information the the zone name should be used instead."

> If we really want to expose it, we'd better expose the zone type
> (i.e. ZONE_NORMAL) intead of this number.
> Per discussion with Michal, seems this zid is not so userful in kswapd
> tracepoints, so we'd better drop it to avoid making noise.
> 
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  include/trace/events/vmscan.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
> index a1cb913..d3f029f 100644
> --- a/include/trace/events/vmscan.h
> +++ b/include/trace/events/vmscan.h
> @@ -73,7 +73,9 @@
>  		__entry->order	= order;
>  	),
>  
> -	TP_printk("nid=%d zid=%d order=%d", __entry->nid, __entry->zid, __entry->order)
> +	TP_printk("nid=%d order=%d",
> +		__entry->nid,
> +		__entry->order)
>  );
>  
>  TRACE_EVENT(mm_vmscan_wakeup_kswapd,
> @@ -96,9 +98,8 @@
>  		__entry->gfp_flags	= gfp_flags;
>  	),
>  
> -	TP_printk("nid=%d zid=%d order=%d gfp_flags=%s",
> +	TP_printk("nid=%d order=%d gfp_flags=%s",
>  		__entry->nid,
> -		__entry->zid,
>  		__entry->order,
>  		show_gfp_flags(__entry->gfp_flags))
>  );
> -- 
> 1.8.3.1

-- 
Michal Hocko
SUSE Labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: vmscan: drop zone id from kswapd tracepoints
  2019-03-13  8:03 ` Michal Hocko
@ 2019-03-13  8:38   ` Yafang Shao
  0 siblings, 0 replies; 3+ messages in thread
From: Yafang Shao @ 2019-03-13  8:38 UTC (permalink / raw)
  To: Michal Hocko; +Cc: Andrew Morton, Linux MM, shaoyafang

On Wed, Mar 13, 2019 at 4:03 PM Michal Hocko <mhocko@kernel.org> wrote:
>
> On Wed 13-03-19 12:36:53, Yafang Shao wrote:
> > The zid is meaningless to the user.
>
> This is quite bold statement. We do not know whether that is useful.
> Quite likely not. I would go with
>
> "It is not clear how is the zone id useful in kswapd tracepoints and the
> id itself is not really easy to process because it depends on the
> configuration (available zones). Let's drop the id for now. If somebody
> really needs that information the the zone name should be used instead."
>

Thanks for your improvements on the commit log :-)

> > If we really want to expose it, we'd better expose the zone type
> > (i.e. ZONE_NORMAL) intead of this number.
> > Per discussion with Michal, seems this zid is not so userful in kswapd
> > tracepoints, so we'd better drop it to avoid making noise.
> >
> > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
>
> Acked-by: Michal Hocko <mhocko@suse.com>
>
> > ---
> >  include/trace/events/vmscan.h | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
> > index a1cb913..d3f029f 100644
> > --- a/include/trace/events/vmscan.h
> > +++ b/include/trace/events/vmscan.h
> > @@ -73,7 +73,9 @@
> >               __entry->order  = order;
> >       ),
> >
> > -     TP_printk("nid=%d zid=%d order=%d", __entry->nid, __entry->zid, __entry->order)
> > +     TP_printk("nid=%d order=%d",
> > +             __entry->nid,
> > +             __entry->order)
> >  );
> >
> >  TRACE_EVENT(mm_vmscan_wakeup_kswapd,
> > @@ -96,9 +98,8 @@
> >               __entry->gfp_flags      = gfp_flags;
> >       ),
> >
> > -     TP_printk("nid=%d zid=%d order=%d gfp_flags=%s",
> > +     TP_printk("nid=%d order=%d gfp_flags=%s",
> >               __entry->nid,
> > -             __entry->zid,
> >               __entry->order,
> >               show_gfp_flags(__entry->gfp_flags))
> >  );
> > --
> > 1.8.3.1
>
> --
> Michal Hocko
> SUSE Labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-13  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13  4:36 [PATCH] mm: vmscan: drop zone id from kswapd tracepoints Yafang Shao
2019-03-13  8:03 ` Michal Hocko
2019-03-13  8:38   ` Yafang Shao

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.