All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: akpm@linux-foundation.org, mingo@redhat.com, ziy@nvidia.com,
	shy828301@gmail.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 3/3] mm: compaction: Fix the migration stats in trace_mm_compaction_migratepages()
Date: Wed, 3 Nov 2021 09:42:32 -0400	[thread overview]
Message-ID: <20211103094232.32a14cf0@gandalf.local.home> (raw)
In-Reply-To: <6fac1a89862b6a8bda4314d1f51380862a6fa986.1635936218.git.baolin.wang@linux.alibaba.com>

On Wed,  3 Nov 2021 18:51:16 +0800
Baolin Wang <baolin.wang@linux.alibaba.com> wrote:

> @@ -2398,10 +2399,10 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
>  
>  		err = migrate_pages(&cc->migratepages, compaction_alloc,
>  				compaction_free, (unsigned long)cc, cc->mode,
> -				MR_COMPACTION, NULL);
> +				MR_COMPACTION, &nr_succeeded);
>  
> -		trace_mm_compaction_migratepages(cc->nr_migratepages, err,
> -							&cc->migratepages);
> +		trace_mm_compaction_migratepages(cc->nr_migratepages,
> +						 nr_succeeded);

Also, I'm surprised you don't just pass in 'cc' and do the dereferencing in
the trace event macro. Accessing the pointers from the trace event and not
dereferencing them to the tracepoint function moves the changes out of line
here and helps with I$.

You could improve some of the other tracepoints that dereference 'cc' as
well in that file.

But as for this change, I'm good with it.

For the tracing aspect:

Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve


>  
>  		/* All pages were either migrated or will be released */
>  		cc->nr_migratepages = 0;

  reply	other threads:[~2021-11-03 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 10:51 [RFC PATCH 0/3] Improve the migration stats Baolin Wang
2021-11-03 10:51 ` [RFC PATCH 1/3] mm: migrate: Fix the return value of migrate_pages() Baolin Wang
2021-11-04 15:33   ` Zi Yan
2021-11-05 10:17     ` Baolin Wang
2021-11-05 15:21       ` Zi Yan
2021-11-07  9:08         ` Baolin Wang
2021-11-03 10:51 ` [RFC PATCH 2/3] mm: migrate: Correct the hugetlb migration stats Baolin Wang
2021-11-04 15:35   ` Zi Yan
2021-11-03 10:51 ` [RFC PATCH 3/3] mm: compaction: Fix the migration stats in trace_mm_compaction_migratepages() Baolin Wang
2021-11-03 13:42   ` Steven Rostedt [this message]
2021-11-04  9:18     ` 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=20211103094232.32a14cf0@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=shy828301@gmail.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 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.