* [PATCH RFC 1/1] delayacct: add memory reclaim delay in
@ 2023-08-23 6:28 liwenyu01
0 siblings, 0 replies; only message in thread
From: liwenyu01 @ 2023-08-23 6:28 UTC (permalink / raw)
To: akpm, linux-mm; +Cc: linux-kernel, wangyun, liwenyu01
[-- Attachment #1: Type: text/plain, Size: 2170 bytes --]
The current memory reclaim delay statistics only count the direct memory
reclaim of the task under slow memory allocation. In systems with NUMA
open, some tasks occasionally experience slower response times, but the
total count of reclaim does not increase, using ftrace can show that
node_reclaim has occurred.
the memory reclaim under get_page_from_freelist() is also due to heavy
memory load. To get the impact of tasks in memory reclaim, this patch adds
the statistics of the memory reclaim delay statistics for __node_reclaim().
Signed-off-by: Wen Yu Li <liwenyu01@bilibili.com>
---
mm/vmscan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 1080209a568b..d2471abce1ae 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -8010,6 +8010,7 @@ static int __node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned in
cond_resched();
psi_memstall_enter(&pflags);
+ delayacct_freepages_start();
fs_reclaim_acquire(sc.gfp_mask);
/*
* We need to be able to allocate from the reserves for RECLAIM_UNMAP
@@ -8032,6 +8033,7 @@ static int __node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned in
memalloc_noreclaim_restore(noreclaim_flag);
fs_reclaim_release(sc.gfp_mask);
psi_memstall_leave(&pflags);
+ delayacct_freepages_end();
trace_mm_vmscan_node_reclaim_end(sc.nr_reclaimed);
--
2.30.2
本邮件仅为指定收件人使用并可能包含保密信息,若您误收到本邮件,敬请通知发件人,并立即删除本邮件及所有副本。您不得擅自传播、转发、保存或复制此邮件(含附件)。感谢您的理解与配合。
This message may contain confidential information, and is intended only for the use of the addressee(s) named above. If you have received this message in error, please contact the sender immediately and delete all copies from your system. You are hereby notified that any dissemination, distribution, preservation or copying of this message and/or attachments is strictly prohibited. Thank you for your understanding and cooperation.
[-- Attachment #2: Type: text/html, Size: 3847 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-23 6:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-23 6:28 [PATCH RFC 1/1] delayacct: add memory reclaim delay in liwenyu01
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox