All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-damon-add-age-of-region-tracepoint-support.patch added to -mm tree
@ 2021-11-15 17:48 akpm
  2021-11-16  8:51 ` SeongJae Park
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2021-11-15 17:48 UTC (permalink / raw)
  To: mm-commits, sj, songmuchun, xhao


The patch titled
     Subject: mm/damon: add 'age' of region tracepoint support
has been added to the -mm tree.  Its filename is
     mm-damon-add-age-of-region-tracepoint-support.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-damon-add-age-of-region-tracepoint-support.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-damon-add-age-of-region-tracepoint-support.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Xin Hao <xhao@linux.alibaba.com>
Subject: mm/damon: add 'age' of region tracepoint support

In Damon, we can get age information by analyzing the nr_access change,
But short time sampling is not effective, we have to obtain enough data
for analysis through long time trace, this also means that we need to
consume more cpu resources and storage space.

Now the region add a new 'age' variable, we only need to get the change of
age value through a little time trace, for example, age has been
increasing to 141, but nr_access shows a value of 0 at the same time,
Through this,we can conclude that the region has a very low nr_access
value for a long time.

Link: https://lkml.kernel.org/r/b9def1262af95e0dc1d0caea447886434db01161.1636989871.git.xhao@linux.alibaba.com
Fixes: 2fcb93629ad8 ("mm/damon: add a tracepoint")
Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/trace/events/damon.h |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/include/trace/events/damon.h~mm-damon-add-age-of-region-tracepoint-support
+++ a/include/trace/events/damon.h
@@ -22,6 +22,7 @@ TRACE_EVENT(damon_aggregated,
 		__field(unsigned long, start)
 		__field(unsigned long, end)
 		__field(unsigned int, nr_accesses)
+		__field(unsigned int, age)
 	),
 
 	TP_fast_assign(
@@ -30,11 +31,13 @@ TRACE_EVENT(damon_aggregated,
 		__entry->start = r->ar.start;
 		__entry->end = r->ar.end;
 		__entry->nr_accesses = r->nr_accesses;
+		__entry->age = r->age;
 	),
 
-	TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u",
+	TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u %u",
 			__entry->target_id, __entry->nr_regions,
-			__entry->start, __entry->end, __entry->nr_accesses)
+			__entry->start, __entry->end,
+			__entry->nr_accesses, __entry->age)
 );
 
 #endif /* _TRACE_DAMON_H */
_

Patches currently in -mm which might be from xhao@linux.alibaba.com are

mm-damon-unified-access_check-function-naming-rules.patch
mm-damon-add-age-of-region-tracepoint-support.patch
mm-damon-core-using-function-abs-instead-of-diff_of.patch
mm-damon-remove-some-no-need-func-definitions-in-damonh-file.patch


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

* Re: + mm-damon-add-age-of-region-tracepoint-support.patch added to -mm tree
  2021-11-15 17:48 + mm-damon-add-age-of-region-tracepoint-support.patch added to -mm tree akpm
@ 2021-11-16  8:51 ` SeongJae Park
  0 siblings, 0 replies; 2+ messages in thread
From: SeongJae Park @ 2021-11-16  8:51 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits, sj, songmuchun, xhao

On Mon, 15 Nov 2021 09:48:33 -0800 akpm@linux-foundation.org wrote:

> 
> The patch titled
>      Subject: mm/damon: add 'age' of region tracepoint support
> has been added to the -mm tree.  Its filename is
>      mm-damon-add-age-of-region-tracepoint-support.patch
> 
> This patch should soon appear at
>     https://ozlabs.org/~akpm/mmots/broken-out/mm-damon-add-age-of-region-tracepoint-support.patch
> and later at
>     https://ozlabs.org/~akpm/mmotm/broken-out/mm-damon-add-age-of-region-tracepoint-support.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
> 
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
> 
> ------------------------------------------------------
> From: Xin Hao <xhao@linux.alibaba.com>
> Subject: mm/damon: add 'age' of region tracepoint support
> 
> In Damon, we can get age information by analyzing the nr_access change,
> But short time sampling is not effective, we have to obtain enough data
> for analysis through long time trace, this also means that we need to
> consume more cpu resources and storage space.
> 
> Now the region add a new 'age' variable, we only need to get the change of
> age value through a little time trace, for example, age has been
> increasing to 141, but nr_access shows a value of 0 at the same time,
> Through this,we can conclude that the region has a very low nr_access
> value for a long time.
> 
> Link: https://lkml.kernel.org/r/b9def1262af95e0dc1d0caea447886434db01161.1636989871.git.xhao@linux.alibaba.com
> Fixes: 2fcb93629ad8 ("mm/damon: add a tracepoint")

This is not true, as 'age' information was not invented at that time.

Other than this,

Reviewed-by: SeongJae Park <sj@kernel.org>


Thanks,
SJ

> Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
> Cc: Muchun Song <songmuchun@bytedance.com>
> Cc: SeongJae Park <sj@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  include/trace/events/damon.h |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> --- a/include/trace/events/damon.h~mm-damon-add-age-of-region-tracepoint-support
> +++ a/include/trace/events/damon.h
> @@ -22,6 +22,7 @@ TRACE_EVENT(damon_aggregated,
>  		__field(unsigned long, start)
>  		__field(unsigned long, end)
>  		__field(unsigned int, nr_accesses)
> +		__field(unsigned int, age)
>  	),
>  
>  	TP_fast_assign(
> @@ -30,11 +31,13 @@ TRACE_EVENT(damon_aggregated,
>  		__entry->start = r->ar.start;
>  		__entry->end = r->ar.end;
>  		__entry->nr_accesses = r->nr_accesses;
> +		__entry->age = r->age;
>  	),
>  
> -	TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u",
> +	TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u %u",
>  			__entry->target_id, __entry->nr_regions,
> -			__entry->start, __entry->end, __entry->nr_accesses)
> +			__entry->start, __entry->end,
> +			__entry->nr_accesses, __entry->age)
>  );
>  
>  #endif /* _TRACE_DAMON_H */
> _
> 
> Patches currently in -mm which might be from xhao@linux.alibaba.com are
> 
> mm-damon-unified-access_check-function-naming-rules.patch
> mm-damon-add-age-of-region-tracepoint-support.patch
> mm-damon-core-using-function-abs-instead-of-diff_of.patch
> mm-damon-remove-some-no-need-func-definitions-in-damonh-file.patch

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

end of thread, other threads:[~2021-11-16  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 17:48 + mm-damon-add-age-of-region-tracepoint-support.patch added to -mm tree akpm
2021-11-16  8:51 ` SeongJae Park

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.