linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>
Cc: <linux-mm@kvack.org>, Daniel Jordan <daniel.m.jordan@oracle.com>,
	"Hugh Dickins" <hughd@google.com>,
	Matthew Wilcox <willy@infradead.org>, Zi Yan <ziy@nvidia.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V3] mm/vmstat: Add events for THP migration without split
Date: Tue, 7 Jul 2020 14:57:18 -0700	[thread overview]
Message-ID: <dfb0661f-60bc-92a4-9a10-3cf09342714c@nvidia.com> (raw)
In-Reply-To: <20200707130406.21ce3d61a4cce25831abb2d1@linux-foundation.org>

On 2020-07-07 13:04, Andrew Morton wrote:
> On Tue,  7 Jul 2020 05:36:55 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> 
>> Add following new vmstat events which will help in validating THP migration
>> without split. Statistics reported through these new VM events will help in
>> performance debugging.
>>
>> 1. THP_MIGRATION_SUCCESS
>> 2. THP_MIGRATION_FAILURE
>> 3. THP_MIGRATION_SPLIT
>>
>> In addition, these new events also update normal page migration statistics
>> appropriately via PGMIGRATE_SUCCESS and PGMIGRATE_FAILURE. While here, this
>> updates current trace event 'mm_migrate_pages' to accommodate now available
>> THP statistics.
> 
> Patch looks straightforward enough.  It would be nice to see some
> confirmation from others that these metrics are a desirable thing to
> export.

Taking a peek now.

> 
>> ...
>>
>> -	trace_mm_migrate_pages(nr_succeeded, nr_failed, mode, reason);
>> +	if (nr_thp_succeeded)
>> +		count_vm_events(THP_MIGRATION_SUCCESS, nr_thp_succeeded);
>> +	if (nr_thp_failed)
>> +		count_vm_events(THP_MIGRATION_FAILURE, nr_thp_failed);
>> +	if (nr_thp_split)
>> +		count_vm_events(THP_MIGRATION_SPLIT, nr_thp_split);
> 
> Are these "if"s worthwhile to have?

No, they are not. And there are a couple more pre-existing cases as well,
right above what can be seen here (this patch just follows the local pattern)
that should also be removed.



thanks,
-- 
John Hubbard
NVIDIA


  reply	other threads:[~2020-07-07 21:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07  0:06 Anshuman Khandual
2020-07-07 20:04 ` Andrew Morton
2020-07-07 21:57   ` John Hubbard [this message]
2020-07-08  0:01 ` John Hubbard
2020-07-08  7:14   ` Anshuman Khandual

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=dfb0661f-60bc-92a4-9a10-3cf09342714c@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=daniel.m.jordan@oracle.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=willy@infradead.org \
    --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