mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Zi Yan <ziy@nvidia.com>, Huang Ying <ying.huang@intel.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH v3 2/2] mm/migrate: add nr_split to trace_mm_migrate_pages stats.
Date: Thu, 19 Oct 2023 19:07:58 +0800	[thread overview]
Message-ID: <862e46d9-1f83-f45d-b743-b2d90fe98773@linux.alibaba.com> (raw)
In-Reply-To: <20231017163129.2025214-2-zi.yan@sent.com>



On 10/18/2023 12:31 AM, Zi Yan wrote:
> From: Zi Yan <ziy@nvidia.com>
> 
> Add nr_split to trace_mm_migrate_pages for large folio (including THP)
> split events.
> 
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Huang Ying <ying.huang@intel.com>
> Cc: Matthew Wilcox <willy@infradead.org>

LGTM. Feel free to add:
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
>   include/trace/events/migrate.h | 24 ++++++++++++++----------
>   mm/migrate.c                   |  3 ++-
>   2 files changed, 16 insertions(+), 11 deletions(-)
> 
> diff --git a/include/trace/events/migrate.h b/include/trace/events/migrate.h
> index 061b5128f335..0190ef725b43 100644
> --- a/include/trace/events/migrate.h
> +++ b/include/trace/events/migrate.h
> @@ -49,10 +49,11 @@ TRACE_EVENT(mm_migrate_pages,
>   
>   	TP_PROTO(unsigned long succeeded, unsigned long failed,
>   		 unsigned long thp_succeeded, unsigned long thp_failed,
> -		 unsigned long thp_split, enum migrate_mode mode, int reason),
> +		 unsigned long thp_split, unsigned long large_folio_split,
> +		 enum migrate_mode mode, int reason),
>   
>   	TP_ARGS(succeeded, failed, thp_succeeded, thp_failed,
> -		thp_split, mode, reason),
> +		thp_split, large_folio_split, mode, reason),
>   
>   	TP_STRUCT__entry(
>   		__field(	unsigned long,		succeeded)
> @@ -60,26 +61,29 @@ TRACE_EVENT(mm_migrate_pages,
>   		__field(	unsigned long,		thp_succeeded)
>   		__field(	unsigned long,		thp_failed)
>   		__field(	unsigned long,		thp_split)
> +		__field(	unsigned long,		large_folio_split)
>   		__field(	enum migrate_mode,	mode)
>   		__field(	int,			reason)
>   	),
>   
>   	TP_fast_assign(
> -		__entry->succeeded	= succeeded;
> -		__entry->failed		= failed;
> -		__entry->thp_succeeded	= thp_succeeded;
> -		__entry->thp_failed	= thp_failed;
> -		__entry->thp_split	= thp_split;
> -		__entry->mode		= mode;
> -		__entry->reason		= reason;
> +		__entry->succeeded			= succeeded;
> +		__entry->failed				= failed;
> +		__entry->thp_succeeded		= thp_succeeded;
> +		__entry->thp_failed			= thp_failed;
> +		__entry->thp_split			= thp_split;
> +		__entry->large_folio_split	= large_folio_split;
> +		__entry->mode				= mode;
> +		__entry->reason				= reason;
>   	),
>   
> -	TP_printk("nr_succeeded=%lu nr_failed=%lu nr_thp_succeeded=%lu nr_thp_failed=%lu nr_thp_split=%lu mode=%s reason=%s",
> +	TP_printk("nr_succeeded=%lu nr_failed=%lu nr_thp_succeeded=%lu nr_thp_failed=%lu nr_thp_split=%lu nr_split=%lu mode=%s reason=%s",
>   		__entry->succeeded,
>   		__entry->failed,
>   		__entry->thp_succeeded,
>   		__entry->thp_failed,
>   		__entry->thp_split,
> +		__entry->large_folio_split,
>   		__print_symbolic(__entry->mode, MIGRATE_MODE),
>   		__print_symbolic(__entry->reason, MIGRATE_REASON))
>   );
> diff --git a/mm/migrate.c b/mm/migrate.c
> index fc2e70b17704..1fecebf4c301 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1979,7 +1979,8 @@ int migrate_pages(struct list_head *from, new_folio_t get_new_folio,
>   	count_vm_events(THP_MIGRATION_SPLIT, stats.nr_thp_split);
>   	trace_mm_migrate_pages(stats.nr_succeeded, stats.nr_failed_pages,
>   			       stats.nr_thp_succeeded, stats.nr_thp_failed,
> -			       stats.nr_thp_split, mode, reason);
> +			       stats.nr_thp_split, stats.nr_split, mode,
> +			       reason);
>   
>   	if (ret_succeeded)
>   		*ret_succeeded = stats.nr_succeeded;

  parent reply	other threads:[~2023-10-19 11:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 16:31 [PATCH v3 1/2] mm/migrate: correct nr_failed in migrate_pages_sync() Zi Yan
2023-10-17 16:31 ` [PATCH v3 2/2] mm/migrate: add nr_split to trace_mm_migrate_pages stats Zi Yan
2023-10-18  1:31   ` Huang, Ying
2023-10-19 11:07   ` Baolin Wang [this message]
2023-10-18  1:27 ` [PATCH v3 1/2] mm/migrate: correct nr_failed in migrate_pages_sync() Huang, Ying
2023-10-19 11:04 ` Baolin 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=862e46d9-1f83-f45d-b743-b2d90fe98773@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.com \
    --cc=ziy@nvidia.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

all inboxes | Powered by JetHome®