On 2020-07-07 13:04, Andrew Morton wrote:
On Tue,  7 Jul 2020 05:36:55 +0530 Anshuman Khandual 
<anshuman.khand...@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 via email to