From: "liwenyu01@bilibili.com" <liwenyu01@bilibili.com>
To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"wangyun@bilibili.com" <wangyun@bilibili.com>,
"liwenyu01@bilibili.com" <liwenyu01@bilibili.com>
Subject: Re: [PATCH RFC] delayacct: add memory reclaim delay in get_page_from_freelist
Date: Thu, 31 Aug 2023 07:26:20 +0000 [thread overview]
Message-ID: <SH0PR01MB0587E4A7886C9642CCF1F8DBC1E5A@SH0PR01MB0587.CHNPR01.prod.partner.outlook.cn> (raw)
In-Reply-To: <SH0PR01MB058780B26AB21BEB8E76B6BBC11CA@SH0PR01MB0587.CHNPR01.prod.partner.outlook.cn>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 2648 bytes --]
This patch just adds the delay statistics of get_page_from_freelist() for memory reclaim, without many modifications.
Anyone in particular I should cc to get this reviewed?
·¢¼þÈË: ÎÄÓî <liwenyu01@bilibili.com>
ÈÕÆÚ: ÐÇÆÚÈý, 2023Äê8ÔÂ23ÈÕ 17:54
ÊÕ¼þÈË: akpm@linux-foundation.org <akpm@linux-foundation.org>, linux-mm@kvack.org <linux-mm@kvack.org>
³ËÍ: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>, ïwÐÜ <wangyun@bilibili.com>, ÎÄÓî <liwenyu01@bilibili.com>
Ö÷Ìâ: [PATCH RFC] delayacct: add memory reclaim delay in get_page_from_freelist
The current memory reclaim delay statistics only count the direct memory
reclaim of the task in do_try_to_free_pages(). 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 occurring in 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: 11742 bytes --]
next prev parent reply other threads:[~2023-08-31 7:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 9:54 liwenyu01
2023-08-31 7:26 ` liwenyu01 [this message]
2023-09-02 23:44 ` Andrew Morton
2023-09-05 2:56 ` 答复: [External]Re: " liwenyu01
2023-09-05 5:32 ` liwenyu01
2023-09-06 0:53 ` Education Directorate
2023-09-07 11:52 ` liwenyu01
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=SH0PR01MB0587E4A7886C9642CCF1F8DBC1E5A@SH0PR01MB0587.CHNPR01.prod.partner.outlook.cn \
--to=liwenyu01@bilibili.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wangyun@bilibili.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