diff options
author | David Rientjes <rientjes@google.com> | 2017-02-23 00:44:50 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-23 01:41:29 +0100 |
commit | 7f354a548d1cb6bb01b6ee74aee9264aa152f1ec (patch) | |
tree | 37036eef9c0d3c708c2fcacebacaa138a884a68e /mm/internal.h | |
parent | mm/mmzone.c: swap likely to unlikely as code logic is different for next_zone... (diff) | |
download | linux-7f354a548d1cb6bb01b6ee74aee9264aa152f1ec.tar.xz linux-7f354a548d1cb6bb01b6ee74aee9264aa152f1ec.zip |
mm, compaction: add vmstats for kcompactd work
A "compact_daemon_wake" vmstat exists that represents the number of
times kcompactd has woken up. This doesn't represent how much work it
actually did, though.
It's useful to understand how much compaction work is being done by
kcompactd versus other methods such as direct compaction and explicitly
triggered per-node (or system) compaction.
This adds two new vmstats: "compact_daemon_migrate_scanned" and
"compact_daemon_free_scanned" to represent the number of pages kcompactd
has scanned as part of its migration scanner and freeing scanner,
respectively.
These values are still accounted for in the general
"compact_migrate_scanned" and "compact_free_scanned" for compatibility.
It could be argued that explicitly triggered compaction could also be
tracked separately, and that could be added if others find it useful.
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1612071749390.69852@chino.kir.corp.google.com
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
-rw-r--r-- | mm/internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h index bfad3b5d2665..9ad04fc6eefe 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -175,6 +175,8 @@ struct compact_control { struct list_head migratepages; /* List of pages being migrated */ unsigned long nr_freepages; /* Number of isolated free pages */ unsigned long nr_migratepages; /* Number of pages to migrate */ + unsigned long total_migrate_scanned; + unsigned long total_free_scanned; unsigned long free_pfn; /* isolate_freepages search base */ unsigned long migrate_pfn; /* isolate_migratepages search base */ unsigned long last_migrated_pfn;/* Not yet flushed page being freed */ |