* + mm-vmscan-add-page-demotion-counter.patch added to -mm tree
@ 2021-07-15 21:28 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-15 21:28 UTC (permalink / raw)
To: dan.j.williams, dave.hansen, david, gthelen, kbusch, mhocko,
mm-commits, osalvador, rientjes, shy828301, weixugc, yang.shi,
ying.huang, ziy
The patch titled
Subject: mm/vmscan: add page demotion counter
has been added to the -mm tree. Its filename is
mm-vmscan-add-page-demotion-counter.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-add-page-demotion-counter.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-add-page-demotion-counter.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Yang Shi <yang.shi@linux.alibaba.com>
Subject: mm/vmscan: add page demotion counter
Account the number of demoted pages.
Add pgdemote_kswapd and pgdemote_direct VM counters showed in
/proc/vmstat.
[ daveh:
- __count_vm_events() a bit, and made them look at the THP
size directly rather than getting data from migrate_pages()
]
Link: https://lkml.kernel.org/r/20210715055145.195411-6-ying.huang@intel.com
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Reviewed-by: Wei Xu <weixugc@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Greg Thelen <gthelen@google.com>
Cc: Keith Busch <kbusch@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/vm_event_item.h | 2 ++
mm/vmscan.c | 5 +++++
mm/vmstat.c | 2 ++
3 files changed, 9 insertions(+)
--- a/include/linux/vm_event_item.h~mm-vmscan-add-page-demotion-counter
+++ a/include/linux/vm_event_item.h
@@ -33,6 +33,8 @@ enum vm_event_item { PGPGIN, PGPGOUT, PS
PGREUSE,
PGSTEAL_KSWAPD,
PGSTEAL_DIRECT,
+ PGDEMOTE_KSWAPD,
+ PGDEMOTE_DIRECT,
PGSCAN_KSWAPD,
PGSCAN_DIRECT,
PGSCAN_DIRECT_THROTTLE,
--- a/mm/vmscan.c~mm-vmscan-add-page-demotion-counter
+++ a/mm/vmscan.c
@@ -1322,6 +1322,11 @@ static unsigned int demote_page_list(str
target_nid, MIGRATE_ASYNC, MR_DEMOTION,
&nr_succeeded);
+ if (current_is_kswapd())
+ __count_vm_events(PGDEMOTE_KSWAPD, nr_succeeded);
+ else
+ __count_vm_events(PGDEMOTE_DIRECT, nr_succeeded);
+
return nr_succeeded;
}
--- a/mm/vmstat.c~mm-vmscan-add-page-demotion-counter
+++ a/mm/vmstat.c
@@ -1217,6 +1217,8 @@ const char * const vmstat_text[] = {
"pgreuse",
"pgsteal_kswapd",
"pgsteal_direct",
+ "pgdemote_kswapd",
+ "pgdemote_direct",
"pgscan_kswapd",
"pgscan_direct",
"pgscan_direct_throttle",
_
Patches currently in -mm which might be from yang.shi@linux.alibaba.com are
mm-migrate-enable-returning-precise-migrate_pages-success-count.patch
mm-vmscan-add-page-demotion-counter.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-15 21:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 21:28 + mm-vmscan-add-page-demotion-counter.patch added to -mm tree akpm
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.